Fix \nobreakdash- roundtrip in moving args

Previously, tex2lyx did not remove the \protect which is output by LyX in
front of \nobreakdash- if needed. Now tex2lyx removes it unconditionally (like
it does elsewhere), because LyX will add it if needed.
This commit is contained in:
Georg Baum 2015-02-27 22:06:11 +01:00
parent caf102558c
commit e76fc73040

View File

@ -3818,7 +3818,12 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
}
else if ((t.cs() == "nobreakdash" && p.next_token().asInput() == "-") ||
(t.cs() == "protect" && p.next_token().asInput() == "\\nobreakdash" &&
p.next_next_token().asInput() == "-") ||
(t.cs() == "@" && p.next_token().asInput() == ".")) {
// LyX sometimes puts a \protect in front, so we have to ignore it
if (t.cs() == "protect")
p.get_token();
context.check_layout(os);
os << "\\SpecialChar \\" << t.cs()
<< p.get_token().asInput() << '\n';