From 7e161a9d5d1331eb8fced35ef0fbb002fa30f60c Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Mon, 4 Nov 2024 12:06:18 +0100 Subject: [PATCH] Fix endless loop in lyx2lyx reversion routine --- lib/lyx2lyx/lyx_2_5.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/lyx2lyx/lyx_2_5.py b/lib/lyx2lyx/lyx_2_5.py index d1730443af..4a1e5b1c27 100644 --- a/lib/lyx2lyx/lyx_2_5.py +++ b/lib/lyx2lyx/lyx_2_5.py @@ -1044,9 +1044,10 @@ def revert_mathml_version(document): # nothing to do break - # remove XHTML header if using the new value, leave alone otherwise. + # reset XHTML header if using the new value, leave alone otherwise. if "4" in document.header[i]: document.header[i] = "\\html_math_output 0" + break while True: i = find_token(document.header, "\\docbook_mathml_version", 0)