commit dd44f71cf9c261bb1ba364a57de7009cdf66ebd3
Author: Richard Heck <[email protected]>
Date:   Fri Apr 25 17:17:10 2014 -0400

    Fix failure to detect quoted flex insets in conversion to layout
    48. Also, simplify this code.
    (cherry picked from commit 7e1541dd49c4c85fb43f6ff72b6f2e7f4efb5c9a)

diff --git a/lib/scripts/layout2layout.py b/lib/scripts/layout2layout.py
index 32f0956..fbc6c75 100644
--- a/lib/scripts/layout2layout.py
+++ b/lib/scripts/layout2layout.py
@@ -401,34 +401,34 @@ def convert(lines):
             # Therefore we need to set it to true for all flex insets which do
             # do not already have a ResetsFont.
             match = re_InsetLayout2.match(lines[i])
-            if match:
-                resetsfont_found = False
-                inherited = False
-                name = string.lower(match.group(1))
-                if name == "flex" or name[:5] == "flex:":
-                    isflexlayout = True
+            if not match:
+                i += 1
+                continue
+
+            name = string.lower(match.group(1))
+            if name != "flex" and name != "\"flex\"" and name[0:5] != "flex:" 
and name [0:6] != "\"flex:":
+                i += 1
+                continue
+
+            resetsfont_found = False
+            inherited = False
+            notdone = True
+            while i < len(lines):
+              match = re_ResetsFont.match(lines[i])
+              if match:
+                  resetsfont_found = True
+              else:
+                match = re_CopyStyle.match(lines[i])
+                if match:
+                  inherited = True
                 else:
-                    isflexlayout = False
-            match = re_ResetsFont.match(lines[i])
-            if match:
-                resetsfont_found = True
-            match = re_End.match(lines[i])
-            if match:
-                if isflexlayout and not resetsfont_found and not inherited:
-                    lines.insert(i, "\tResetsFont true")
-                    i += 1
-            match = re_Style.match(lines[i])
-            if match:
-                isflexlayout = False
-                inherited = False
-            match = re_Counter.match(lines[i])
-            if match:
-                isflexlayout = False
-                inherited = False
-            match = re_CopyStyle.match(lines[i])
-            if match:
-                inherited = True
-            i += 1
+                  match = re_End.match(lines[i])
+                  if match:
+                    break
+              i += 1
+            if not resetsfont_found and not inherited:
+              lines.insert(i, "\tResetsFont true")
+
             continue
 
         if format >= 44 and format <= 47:
diff --git a/status.21x b/status.21x
index 8f1fa3e..4e1547c 100644
--- a/status.21x
+++ b/status.21x
@@ -59,6 +59,8 @@ What's new
 - Fix handling of multiple bibliography styles when using sectioned 
bibliography
   (bug 9060).
 
+- Fix problem converting layout files and modules when Flex inset names are
+  quoted.
 
 
 * USER INTERFACE

Reply via email to