Stop using a GCC extension for an unprintable character in regex.

This commit is contained in:
Thibaut Cuvelier 2021-02-13 18:23:01 +01:00
parent c6dfc70367
commit d8c6bc7c1f

View File

@ -718,15 +718,15 @@ string const replaceEnvironmentPath(string const & path)
}
string env_var = getEnv(what.str(2));
if (env_var.empty()) {
// temporarily use escape (0x1B) in place of $
// temporarily use alert/bell (0x07) in place of $
if (brackets)
env_var = "\e{" + what.str(2) + '}';
env_var = "\a{" + what.str(2) + '}';
else
env_var = "\e" + what.str(2);
env_var = "\a" + what.str(2);
}
result = what.str(1) + env_var + what.str(3);
}
return subst(result, '\e', '$');
return subst(result, '\a', '$');
} catch (exception const & e) {
LYXERR0("Something is very wrong: " << e.what());
return path;