pimpl_->is
will return false no matter what. So we need a different way to
check if the delimiter was found.
docstring str;
docstring prefix;
bool firstline = true;
+ bool foundend = false;
while (pimpl_->is) { //< eatLine only reads from is, not from pushTok
if (!eatLine())
LYXERR(Debug::PARSER, "LongString: `" << tmpstr << '\'');
// We do a case independent comparison, like searchKeyword does.
- if (compare_no_case(token, endtoken) == 0)
+ if (compare_no_case(token, endtoken) == 0) {
+ foundend = true;
break;
+ }
if (firstline) {
size_t i = tmpstr.find_first_not_of(from_ascii(" \t"));
str += tmpstr + '\n';
}
- if (!pimpl_->is)
+ if (!foundend)
printError("Long string not ended by `" + to_utf8(endtoken) + '\'');
return str;