From: Richard Heck Date: Thu, 18 Oct 2007 05:34:00 +0000 (+0000) Subject: Fix up the HREF inset reversion routine. X-Git-Tag: 1.6.10~7802 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=bfbf9c14e227685f4e6ae2acbb0cd66c28315f6d;p=lyx.git Fix up the HREF inset reversion routine. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21027 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/lyx2lyx/lyx_1_6.py b/lib/lyx2lyx/lyx_1_6.py index 28683888c0..b142d7d8ec 100644 --- a/lib/lyx2lyx/lyx_1_6.py +++ b/lib/lyx2lyx/lyx_1_6.py @@ -579,11 +579,12 @@ def revert_href(document): 'Reverts hyperlink insets (href) to url insets (url)' i = 0 while True: - i = find_token(document.body, "LatexCommand href", i) - if i == -1: - return - document.body[i] = "LatexCommand url" - i = i + 1 + i = find_token(document.body, "\\begin_inset CommandInset href", i) + if i == -1: + return + document.body[i : i + 2] = + ["\\begin_inset CommandInset url", "LatexCommand url"] + i = i + 2 ##