Fix some parsing glitches in Autonest and IsAutonestedBy

Layouts can have spaces, underlines (that must be read as spaces, and
be enquoted)

Candidate for stable

(cherry picked from commit da273a944f)
This commit is contained in:
Juergen Spitzmueller 2018-12-29 13:36:39 +01:00
parent d62775553a
commit 51db94b350
2 changed files with 15 additions and 12 deletions

View File

@ -597,25 +597,25 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass)
}
case LT_AUTONESTS: {
docstring const autonest =
subst(subst(subst(lex.getLongString(from_ascii("EndAutoNests")),
from_ascii("\n"), docstring()),
from_ascii(" "), docstring()),
from_ascii("\t"), docstring());
docstring autonest = lex.getLongString(from_ascii("EndAutoNests"));
autonest = subst(autonest, from_ascii("\n"), docstring());
autonest = subst(autonest, from_ascii("\t"), docstring());
autonest = subst(autonest, from_ascii("\""), docstring());
autonest = subst(autonest, '_', ' ');
vector<docstring> const autonests =
getVectorFromString(autonest);
getVectorFromString(autonest, from_ascii(","), false, true);
autonests_.insert(autonests.begin(), autonests.end());
break;
}
case LT_AUTONESTEDBY: {
docstring const autonest =
subst(subst(subst(lex.getLongString(from_ascii("EndIsAutoNestedBy")),
from_ascii("\n"), docstring()),
from_ascii(" "), docstring()),
from_ascii("\t"), docstring());
docstring autonest = lex.getLongString(from_ascii("EndIsAutoNestedBy"));
autonest = subst(autonest, from_ascii("\n"), docstring());
autonest = subst(autonest, from_ascii("\t"), docstring());
autonest = subst(autonest, from_ascii("\""), docstring());
autonest = subst(autonest, '_', ' ');
vector<docstring> const autonests =
getVectorFromString(autonest);
getVectorFromString(autonest, from_ascii(","), false, true);
autonested_by_.insert(autonests.begin(), autonests.end());
break;
}

View File

@ -73,6 +73,9 @@ What's new
- Beamer: automatically nest column in columns.
- Fix Autonests and IsAutonestedBy layout tags with specific layout names
(with space, underbar and enquoted).
* USER INTERFACE