Simplify this complicated routine of mine now.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36116 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-11-05 15:13:42 +00:00
parent 6b81613f9c
commit 5fe584cc9c

View File

@ -1282,13 +1282,8 @@ def revert_lyx_version(document):
# type "lyxinfo" # type "lyxinfo"
# arg "version" # arg "version"
# \end_inset # \end_inset
# but we shall try to be forgiving. typ = get_quoted_value(document.body, "type", i, j)
arg = typ = "" arg = get_quoted_value(document.body, "arg", i, j)
for k in range(i, j):
if document.body[k].startswith("arg"):
arg = document.body[k][3:].strip().strip('"')
if document.body[k].startswith("type"):
typ = document.body[k][4:].strip().strip('"')
if arg != "version" or typ != "lyxinfo": if arg != "version" or typ != "lyxinfo":
i = j + 1 i = j + 1
continue continue