]> git.lyx.org Git - lyx.git/commitdiff
Fix up the HREF inset reversion routine.
authorRichard Heck <rgheck@comcast.net>
Thu, 18 Oct 2007 05:34:00 +0000 (05:34 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 18 Oct 2007 05:34:00 +0000 (05:34 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21027 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/lyx_1_6.py

index 28683888c0e4353a4ce2f529f0edb3f515f0c42c..b142d7d8ec70d0f9c25caf780d5a1fa9be838335 100644 (file)
@@ -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
 
 
 ##