mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Remove more unused variables.
These flags are only relevant to reference-types that we are not reverting. That's why they were unused.
This commit is contained in:
parent
8e3f99ddc9
commit
b0fa3efd57
@ -4545,7 +4545,7 @@ def revert_starred_refs(document):
|
|||||||
i = 0
|
i = 0
|
||||||
in_inset = False
|
in_inset = False
|
||||||
cmd = ref = ""
|
cmd = ref = ""
|
||||||
plural = caps = noprefix = nolink = False
|
nolink = False
|
||||||
nolinkline = -1
|
nolinkline = -1
|
||||||
while True:
|
while True:
|
||||||
if not in_inset:
|
if not in_inset:
|
||||||
@ -4575,7 +4575,7 @@ def revert_starred_refs(document):
|
|||||||
if i == end:
|
if i == end:
|
||||||
in_inset = False
|
in_inset = False
|
||||||
# If nolink is False, just remove that line
|
# If nolink is False, just remove that line
|
||||||
if nolink == False or cmd == "formatted":
|
if nolink == False or cmd == "formatted" or cmd == "labelonly":
|
||||||
# document.warning("Skipping " + cmd + " " + ref)
|
# document.warning("Skipping " + cmd + " " + ref)
|
||||||
if nolinkline != -1:
|
if nolinkline != -1:
|
||||||
del document.body[nolinkline]
|
del document.body[nolinkline]
|
||||||
@ -4588,7 +4588,7 @@ def revert_starred_refs(document):
|
|||||||
i += len(newlines) - (end - start) + 1
|
i += len(newlines) - (end - start) + 1
|
||||||
# reset variables
|
# reset variables
|
||||||
cmd = ref = ""
|
cmd = ref = ""
|
||||||
plural = caps = noprefix = nolink = False
|
nolink = False
|
||||||
nolinkline = -1
|
nolinkline = -1
|
||||||
continue
|
continue
|
||||||
l = document.body[i]
|
l = document.body[i]
|
||||||
@ -4596,15 +4596,6 @@ def revert_starred_refs(document):
|
|||||||
cmd = l[13:]
|
cmd = l[13:]
|
||||||
elif l.startswith("reference"):
|
elif l.startswith("reference"):
|
||||||
ref = l[11:-1]
|
ref = l[11:-1]
|
||||||
elif l.startswith("caps"):
|
|
||||||
tmp = l[6:-1]
|
|
||||||
caps = (tmp == "true")
|
|
||||||
elif l.startswith("plural"):
|
|
||||||
tmp = l[8:-1]
|
|
||||||
plural = (tmp == "true")
|
|
||||||
elif l.startswith("noprefix"):
|
|
||||||
tmp = l[10:-1]
|
|
||||||
noprefix = (tmp == "true")
|
|
||||||
elif l.startswith("nolink"):
|
elif l.startswith("nolink"):
|
||||||
tmp = l[8:-1]
|
tmp = l[8:-1]
|
||||||
nolink = (tmp == "true")
|
nolink = (tmp == "true")
|
||||||
|
Loading…
Reference in New Issue
Block a user