commit 9cd9712cf088ff0f57c86ae95a85dd323b2f6ee2
Author: Richard Kimberly Heck <[email protected]>
Date: Fri Dec 28 23:02:47 2018 -0500
Fix bug #11378.
(cherry picked from commit f11a51be35b54882e77d2cce189fedb2085412dd)
---
lib/lyx2lyx/lyx2lyx_tools.py | 12 +++++++++++-
status.23x | 2 ++
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/lib/lyx2lyx/lyx2lyx_tools.py b/lib/lyx2lyx/lyx2lyx_tools.py
index f63f402..ba179a7 100644
--- a/lib/lyx2lyx/lyx2lyx_tools.py
+++ b/lib/lyx2lyx/lyx2lyx_tools.py
@@ -450,7 +450,7 @@ def revert_font_attrs(lines, name, LaTeXname):
while True:
i = find_token(lines, name + ' on', i)
if i == -1:
- return changed
+ break
j = find_token(lines, name + ' default', i)
k = find_token(lines, name + ' on', i + 1)
# if there is no default set, the style ends with the layout
@@ -464,6 +464,16 @@ def revert_font_attrs(lines, name, LaTeXname):
changed = True
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):
" Reverts a command from a layout to TeX code "
diff --git a/status.23x b/status.23x
index 26cb697..2490a67 100644
--- a/status.23x
+++ b/status.23x
@@ -99,6 +99,8 @@ What's new
- Speed up some lyx2lyx conversions (bug 11200).
+- Fix routine that left some old parameters unremoved (bug 11373).
+
* TEX2LYX