Fix reversion of noprefix option for InsetRef.

Basically forgot to remove the option when we're not dealing with
a labelonly inset.
This commit is contained in:
Richard Heck 2017-05-16 12:32:42 -04:00
parent 80bc39ebc9
commit d75c0ec8b1

View File

@ -1146,11 +1146,12 @@ def revert_noprefix(document):
i += 1
continue
k = find_token(document.body, "LatexCommand labelonly", i, j)
if k == -1:
i = j
continue
noprefix = get_bool_value(document.body, "noprefix", i, j)
noprefix = False
if k != -1:
noprefix = get_bool_value(document.body, "noprefix", i, j)
if not noprefix:
# either it was not a labelonly command, or else noprefix was not set.
# in that case, we just delete the option.
del_token(document.body, "noprefix", i, j)
i = j
continue