Avoid loop in math parsing function

This commit is contained in:
Juergen Spitzmueller 2024-07-25 09:18:01 +02:00
parent 0d50a8417f
commit 003bbd3483

View File

@ -663,7 +663,13 @@ docstring Encodings::convertLaTeXCommands(docstring const & str, bool const for_
if (cmd.empty())
break;
// go on ...
docstring oldrem = rem;
ret += fromLaTeXCommand(from_ascii("\\") + cmd, MATH_CMD, termination, rem);
if (oldrem == rem) {
// Result unchanged, output
ret += rem;
break;
}
}
mret = docstring();
}