]> git.lyx.org Git - features.git/blobdiff - lib/scripts/layout2layout.py
New layout tags specifically for CSS information.
[features.git] / lib / scripts / layout2layout.py
index a59dfcfae2afbd3425278d44a4f8ee17edf69e90..fe7c4e175cc6700d3c64b151f7ecdc6ecc960809 100644 (file)
@@ -129,7 +129,7 @@ import os, re, string, sys
 # development/tools/updatelayouts.sh script to update all
 # layout files to the new format.
 
-currentFormat = 35
+currentFormat = 36
 
 
 def usage(prog_name):
@@ -152,7 +152,7 @@ def trim_bom(line):
 
 def read(source):
     " Read input file and strip lineendings."
-    lines = source.read().splitlines()
+    lines = source.read().splitlines() or ['']
     lines[0] = trim_bom(lines[0])
     return lines
 
@@ -314,6 +314,10 @@ def convert(lines):
                 i += 1
             continue
 
+        if format == 35:
+          i += 1
+          continue
+
         if format == 34:
           match = re_InsetLayout2.match(lines[i])
           if not match:
@@ -753,6 +757,8 @@ def convert(lines):
 
         i += 1
 
+    if only_comment:
+        lines.insert(i, "Format 2")
     if usemodules:
         i = formatline + 1
         for mod in usemodules: