mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Ignore \protect if it is directly in front of \LyX{} (otherwise it would
accumulate for each round trip, since LyX writes \protect if needed) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37214 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cfd6767ec1
commit
7a74bbf06b
@ -2134,9 +2134,15 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
|
||||
os << "\\lyxline";
|
||||
}
|
||||
|
||||
else if (is_known(t.cs(), known_phrases)) {
|
||||
else if (is_known(t.cs(), known_phrases) ||
|
||||
(t.cs() == "protect" &&
|
||||
p.next_token().cat() == catEscape &&
|
||||
is_known(p.next_token().cs(), known_phrases))) {
|
||||
// LyX sometimes puts a \protect in front, so we have to ignore it
|
||||
// FIXME: This needs to be changed when bug 4752 is fixed.
|
||||
char const * const * where = is_known(t.cs(), known_phrases);
|
||||
char const * const * where = is_known(
|
||||
t.cs() == "protect" ? p.get_token().cs() : t.cs(),
|
||||
known_phrases);
|
||||
context.check_layout(os);
|
||||
os << known_coded_phrases[where - known_phrases];
|
||||
skip_spaces_braces(p);
|
||||
|
Loading…
Reference in New Issue
Block a user