]> git.lyx.org Git - features.git/commitdiff
Fix conversion of beamer block titles that end with a non-ERT inset.
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 27 Apr 2014 07:44:43 +0000 (09:44 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 27 Apr 2014 07:44:43 +0000 (09:44 +0200)
lib/lyx2lyx/lyx_2_1.py
status.21x

index c7768b1ace39a2cfa6d861069f9bbc551c8d0426..5459e1ddb45790bbbfab843a6db6591d0a30e043 100644 (file)
@@ -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
index 4e1547cda1144fe9e4bc5c7f0092636caa2353fb..c32b380317979de160ba8803a01cda82932d7edf 100644 (file)
@@ -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