Fix up the HREF inset reversion routine.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21027 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2007-10-18 05:34:00 +00:00
parent f2418483a0
commit bfbf9c14e2

View 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
##