]> git.lyx.org Git - lyx.git/blobdiff - lib/scripts/layout2layout.py
DocBook: make all make* functions have the same argument order.
[lyx.git] / lib / scripts / layout2layout.py
index a8c1451d4054fe014cadc292fb54fcbc17c14bbf..7cf2332300fb23150190aa20c899caf3b5017ecc 100644 (file)
@@ -11,7 +11,7 @@
 # This script will update a .layout file to current format
 
 # The latest layout format is also defined in src/TextClass.cpp
-currentFormat = 81
+currentFormat = 84
 
 
 # Incremented to format 4, 6 April 2007, lasgouttes
@@ -268,9 +268,27 @@ currentFormat = 81
 # Incremented to format 80, 12 August 2019 by spitz
 # New float option Requires
 
-# Incremented to format 80, 12 August 2019 by rikiheck
+# Incremented to format 81, 12 August 2019 by rikiheck
 # New tag GuiName for counters
 
+# Incremented to format 82, 4 June 2017 by dourouc05
+# - Add new tags for Layout:
+#   DocBookTag, DocBookAttr, DocBookInInfo,
+#   DocBookWrapperTag, DocBookWrapperAttr,
+#   DocBookItemWrapperTag, DocBookItemWrapperAttr,
+#   DocBookItemTag, DocBookItemAttr,
+#   DocBookLabelTag, DocBookLabelAttr
+# - Removed tag Header from ClassOptionsClassOptions
+# - Removed tag Element for flex insets
+
+# Incremented to format 83, 2 August 2020 by dourouc05
+# New tags DocBookWrapperMergeWithPrevious and DocBookAbstract
+
+# Incremented to format 84, 17 August 2020 by tcuvelier
+# New tags DocBookTagType, DocBookWrapperTagTagType,
+# DocBookItemWrapperTagTagType, DocBookItemTagTagType,
+# DocBookLabelTag
+
 # Do not forget to document format change in Customization
 # Manual (section "Declaring a new text class").
 
@@ -520,7 +538,21 @@ def convert(lines, end_format):
                 i += 1
             continue
 
-        if format >= 65 and format <= 80:
+        if format == 81:
+            match = re.compile(b'^(\\s*Header\\s+)("?\\w+"?)', re.IGNORECASE).match(lines[i])
+            if match:
+                del lines[i]
+                continue
+
+            match = re.compile(b'(\\s*LyXType\\s+)(\\w+)(\\s*Element\\s+)', re.IGNORECASE).match(lines[i])
+            if match:
+                del lines[i]
+                continue
+
+            i += 1
+            continue
+
+        if 65 <= format <= 80:
             # nothing to do.
             i += 1
             continue