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
This commit is contained in:
Juergen Spitzmueller 2018-12-29 13:36:39 +01:00
parent 012d9b088e
commit da273a944f

View File

@ -605,25 +605,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;
}