From: Richard Heck Date: Thu, 4 Nov 2010 17:16:23 +0000 (+0000) Subject: Minor cleanup for IEEETran reversion. X-Git-Tag: 2.0.0~2034 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=dd0a13558823bc76cac3803881d5d1fe9992b443;p=features.git Minor cleanup for IEEETran reversion. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36081 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/lyx2lyx/lyx_2_0.py b/lib/lyx2lyx/lyx_2_0.py index 681e418118..b628d8bb1d 100644 --- a/lib/lyx2lyx/lyx_2_0.py +++ b/lib/lyx2lyx/lyx_2_0.py @@ -1507,7 +1507,7 @@ def revert_IEEEtran(document): i = find_token(document.body, '\\begin_layout ' + layout, i) if i == -1: break - j = find_end_of(document.body, i, '\\begin_layout', '\\end_layout') + j = find_end_of_layout(document.body, i) if j == -1: document.warning("Malformed LyX document: Can't find end of " + layout + " layout.") i += 1 @@ -1515,10 +1515,11 @@ def revert_IEEEtran(document): if layout in obsoletedby: document.body[i] = "\\begin_layout " + obsoletedby[layout] i = j - else: - content = lyx2latex(document, document.body[i:j + 1]) - add_to_preamble(document, [latexcmd[layout] + "{" + content + "}"]) - del document.body[i:j + 1] + continue + content = lyx2latex(document, document.body[i:j + 1]) + add_to_preamble(document, [latexcmd[layout] + "{" + content + "}"]) + del document.body[i:j + 1] + # no need to reset i def convert_prettyref(document):