From 72a84b1c0950e9e03e80da827fce94c18fca48dc Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sun, 1 Jun 2008 01:50:39 +0000 Subject: [PATCH] Fix framed notes lyx2lyx reversion. Again, this was a mechanical fix. It should be checked. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25035 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/lyx2lyx/lyx_1_6.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/lyx2lyx/lyx_1_6.py b/lib/lyx2lyx/lyx_1_6.py index e6158202c8..7252da70ad 100644 --- a/lib/lyx2lyx/lyx_1_6.py +++ b/lib/lyx2lyx/lyx_1_6.py @@ -1423,8 +1423,13 @@ def revert_framed_notes(document): del document.body[i+1:k] else: document.body[i] = document.body[i].replace("\\begin_inset Box Shaded", "\\begin_inset Box Frameless") - document.body.insert(l + 1, "\\begin_inset Note Shaded\n" + status + "\n\\begin_layout Standard\n") - document.body.insert(m + 1, "\\end_layout\n\\end_inset") + subst1 = [document.body[l], + "\\begin_inset Note Shaded", + status, + '\\begin_layout Standard'] + document.body[l:l + 1] = subst1 + subst2 = [document.body[m], "\\end_layout", "\\end_inset"] + document.body[m:m + 1] = subst2 i = i + 1 -- 2.39.2