From 62ad4a1ab5ff5f4daf4ea19ec56f6a176598d4f3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Mon, 24 Apr 2017 23:02:09 +0200 Subject: [PATCH] lyx2lyx/lyx_2_2.py: backport another box reversion issue --- lib/lyx2lyx/lyx_2_2.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/lyx2lyx/lyx_2_2.py b/lib/lyx2lyx/lyx_2_2.py index c30477de17..a65f8ca67d 100644 --- a/lib/lyx2lyx/lyx_2_2.py +++ b/lib/lyx2lyx/lyx_2_2.py @@ -1093,11 +1093,13 @@ def revert_BoxFeatures(document): if i == -1: return binset = find_token(document.body, "\\begin_inset Box", i - 11) - if binset == -1: - return # then "thickness" is is just a word in the text + if binset == -1 or binset != i - 11: + i = i + 1 + continue # then "thickness" is is just a word in the text einset = find_end_of_inset(document.body, binset) if einset == -1: document.warning("Malformed LyX document: Can't find end of box inset!") + i = i + 1 continue # read out the values beg = document.body[i].find('"'); -- 2.39.5