commit 560a421e58137e03669f5ba886abfeaefaa0b07c
Author: Juergen Spitzmueller <[email protected]>
Date:   Sat Nov 29 10:54:05 2014 +0100

    Fix and simplify par params parsing in get_containing_layout.
    
    The previous version did not catch \align <alignment>.

diff --git a/lib/lyx2lyx/parser_tools.py b/lib/lyx2lyx/parser_tools.py
index c989515..f5f285e 100644
--- a/lib/lyx2lyx/parser_tools.py
+++ b/lib/lyx2lyx/parser_tools.py
@@ -470,13 +470,12 @@ def get_containing_layout(lines, i):
       # shouldn't happen
       return False
   par_params = ["\\noindent", "\\indent", "\\indent-toggle", "\\leftindent",
-                "\\start_of_appendix", "\\paragraph_spacing single",
-                "\\paragraph_spacing onehalf", "\\paragraph_spacing double",
-                "\\paragraph_spacing other", "\\align", "\\labelwidthstring"]
+                "\\start_of_appendix", "\\paragraph_spacing", "\\align",
+                "\\labelwidthstring"]
   stpar = stlay
   while True:
       stpar += 1
-      if lines[stpar] not in par_params:
+      if lines[stpar].split(' ', 1)[0] not in par_params:
           break
   return (lay, stlay, endlay, stpar)
 
diff --git a/status.21x b/status.21x
index 5f87cc5..aeb585c 100644
--- a/status.21x
+++ b/status.21x
@@ -108,6 +108,8 @@ What's new
 - Fix import of ERT beamer block titles which are preceeded by a
   language switch.
 
+- Fix and simplify paragraph params parsing in get_containing_layout.
+
 
 * USER INTERFACE
 

Reply via email to