This commit is contained in:
Richard Kimberly Heck 2018-12-28 23:02:47 -05:00
parent f92107c68e
commit f11a51be35

View File

@ -465,7 +465,7 @@ def revert_font_attrs(lines, name, LaTeXname):
while True: while True:
i = find_token(lines, name + ' on', i) i = find_token(lines, name + ' on', i)
if i == -1: if i == -1:
return changed break
j = find_token(lines, name + ' default', i) j = find_token(lines, name + ' default', i)
k = find_token(lines, name + ' on', i + 1) k = find_token(lines, name + ' on', i + 1)
# if there is no default set, the style ends with the layout # if there is no default set, the style ends with the layout
@ -479,6 +479,16 @@ def revert_font_attrs(lines, name, LaTeXname):
changed = True changed = True
i += 1 i += 1
# now delete all remaining lines that manipulate this attribute
i = 0
while True:
i = find_token(lines, name, i)
if i = -1:
break
del lines[i]
return changed
def revert_layout_command(lines, name, LaTeXname): def revert_layout_command(lines, name, LaTeXname):
" Reverts a command from a layout to TeX code " " Reverts a command from a layout to TeX code "