From bfbf9c14e227685f4e6ae2acbb0cd66c28315f6d Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Thu, 18 Oct 2007 05:34:00 +0000 Subject: [PATCH] Fix up the HREF inset reversion routine. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21027 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/lyx2lyx/lyx_1_6.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 ## -- 2.39.5