commit 8b7d5276b8e5f08659221c03be10d3d60d39775a
Author: Juergen Spitzmueller <[email protected]>
Date: Sun Apr 27 09:44:43 2014 +0200
Fix conversion of beamer block titles that end with a non-ERT inset.
diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py
index c7768b1..5459e1d 100644
--- a/lib/lyx2lyx/lyx_2_1.py
+++ b/lib/lyx2lyx/lyx_2_1.py
@@ -2912,7 +2912,16 @@ def convert_beamerblocks(document):
if i != -1:
if document.body[parbeg] == "\\begin_inset ERT":
ertcontfirstline = parbeg + 5
- ertcontlastline = parend - 6
+ # Find the last ERT in this paragraph (which might also be
the first)
+ lastertbeg = find_token_backwards(document.body,
"\\begin_inset ERT", j)
+ if lastertbeg == -1:
+ document.warning("Last ERT not found!")
+ break
+ lastertend = find_end_of_inset(document.body, lastertbeg)
+ if lastertend == -1:
+ document.warning("End of last ERT not found!")
+ break
+ ertcontlastline = lastertend - 3
while True:
if document.body[ertcontfirstline].startswith("<"):
# This is an overlay specification
diff --git a/status.21x b/status.21x
index 4e1547c..c32b380 100644
--- a/status.21x
+++ b/status.21x
@@ -62,6 +62,8 @@ What's new
- Fix problem converting layout files and modules when Flex inset names are
quoted.
+- Fix conversion of beamer block titles ending with non-ERT insets to 2.1
format.
+
* USER INTERFACE