mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
tex2lyx: simplify babel shorthands detection
This commit is contained in:
parent
f72d68cd9f
commit
1f48af5f55
@ -145,6 +145,9 @@ string fboxrule = "";
|
||||
string fboxsep = "";
|
||||
string shadow_size = "";
|
||||
|
||||
char const * const known_babel_shorthands[] = { "\"", "|", "-", "~", "=", "/",
|
||||
"~", "*", ":", "_", "x", "'", "`", "<", ">", 0 };
|
||||
|
||||
char const * const known_ref_commands[] = { "ref", "pageref", "vref",
|
||||
"vpageref", "prettyref", "nameref", "eqref", 0 };
|
||||
|
||||
@ -3345,24 +3348,10 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
|
||||
// verbatim).
|
||||
if (t.asInput() == "\"") {
|
||||
string s = "\"";
|
||||
// These are known pairs. We put them together in
|
||||
// We put the known shorthand pairs together in
|
||||
// one ERT inset. In other cases (such as "a), only
|
||||
// the quotation mark is ERTed.
|
||||
if (p.next_token().asInput() == "\""
|
||||
|| p.next_token().asInput() == "|"
|
||||
|| p.next_token().asInput() == "-"
|
||||
|| p.next_token().asInput() == "~"
|
||||
|| p.next_token().asInput() == "="
|
||||
|| p.next_token().asInput() == "/"
|
||||
|| p.next_token().asInput() == "~"
|
||||
|| p.next_token().asInput() == "*"
|
||||
|| p.next_token().asInput() == ":"
|
||||
|| p.next_token().asInput() == "_"
|
||||
|| p.next_token().asInput() == "x"
|
||||
|| p.next_token().asInput() == "'"
|
||||
|| p.next_token().asInput() == "`"
|
||||
|| p.next_token().asInput() == "<"
|
||||
|| p.next_token().asInput() == ">") {
|
||||
if (is_known(p.next_token().asInput(), known_babel_shorthands)) {
|
||||
s += p.next_token().asInput();
|
||||
p.get_token();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user