Enrico Forestieri
2014-05-29 08:48:57 UTC
commit da75d3194824c87e2b2fc92fa4644e080aeaf962
Date: Thu May 29 10:44:02 2014 +0200
Fix reversion of box insets.
Richard, you may want to cherry-pick this for 2.1 and 2.0.Date: Thu May 29 10:44:02 2014 +0200
Fix reversion of box insets.
It fixes reversion in cases like the one in the attached example.
diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py
index 4999368..6752eb9 100644
--- a/lib/lyx2lyx/lyx_2_1.py
+++ b/lib/lyx2lyx/lyx_2_1.py
i += 1
continue
BeginLayout = find_token(document.body, "\\begin_layout Plain Layout", j)
- EndLayout = find_token(document.body, "\\end_layout", BeginLayout)
+ EndLayout = find_end_of_layout(document.body, BeginLayout)
# replace if width is ""
document.body[EndLayout:k + 1] = put_cmd_in_ert("}")
index 4999368..6752eb9 100644
--- a/lib/lyx2lyx/lyx_2_1.py
+++ b/lib/lyx2lyx/lyx_2_1.py
i += 1
continue
BeginLayout = find_token(document.body, "\\begin_layout Plain Layout", j)
- EndLayout = find_token(document.body, "\\end_layout", BeginLayout)
+ EndLayout = find_end_of_layout(document.body, BeginLayout)
# replace if width is ""
document.body[EndLayout:k + 1] = put_cmd_in_ert("}")
--
Enrico
Enrico