commit 52e21bfcc9f90020359ede75f09d331f63b995ee
Author: Juergen Spitzmueller <[email protected]>
Date: Thu Aug 22 17:16:26 2019 +0200
lyx2lyx: fixup gloss reversion
---
lib/lyx2lyx/lyx_2_4.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py
index 97a3f30..8436d9a 100644
--- a/lib/lyx2lyx/lyx_2_4.py
+++ b/lib/lyx2lyx/lyx_2_4.py
@@ -2022,7 +2022,7 @@ def revert_linggloss(document):
beginPlain = find_token(document.body, "\\begin_layout Plain
Layout", i)
endInset = find_end_of_inset(document.body, i)
- endPlain = find_token_backwards(document.body, "\\end_layout",
endInset)
+ endPlain = find_end_of_layout(document.body, beginPlain)
precontent = put_cmd_in_ert(cmd)
if len(optargcontent) > 0:
precontent += put_cmd_in_ert("[") + optargcontent +
put_cmd_in_ert("]")