commit 003bbd3483c9697a3d5105b26cb43a95ef20a0e8 Author: Juergen Spitzmueller <sp...@lyx.org> Date: Thu Jul 25 09:18:01 2024 +0200
Avoid loop in math parsing function --- src/Encoding.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Encoding.cpp b/src/Encoding.cpp index 675834f63f..33ae59045c 100644 --- a/src/Encoding.cpp +++ b/src/Encoding.cpp @@ -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(); } -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs