Commit 785b1d0892ac042cadda3959f8783cd48b0334a6

Werner Lemberg 2014-11-30T22:16:34

[docmaker] Allow empty lines in `<Order>' blocks. Before this patch, the suggested order of entries stopped at the first empty line. Obviously, nobody noticed that this problem caused a much reduced set of links in the `Synopsis' sections; in particular, the `<Order>' blocks contain a lot of entries that wouldn't be listed otherwise... * src/tools/docmaker/content.py (DocBlock::get_markup_words_all): New function to iterate over all items. (DocSection::process): Use it.

diff --git a/ChangeLog b/ChangeLog
index a0d3299..083c131 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
 2014-11-29  Werner Lemberg  <wl@gnu.org>
 
+	[docmaker] Allow empty lines in `<Order>' blocks.
+
+	Before this patch, the suggested order of entries stopped at the
+	first empty line.
+
+	Obviously, nobody noticed that this problem caused a much reduced
+	set of links in the `Synopsis' sections; in particular, the
+	`<Order>' blocks contain a lot of entries that wouldn't be listed
+	otherwise...
+
+	* src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
+	New function to iterate over all items.
+	(DocSection::process): Use it.
+
+2014-11-29  Werner Lemberg  <wl@gnu.org>
+
 	* src/tools/docmaker/sources.py (column) [Format 2]: Fix regexp.
 
 	After the single asterisk there must be no other immediately following
diff --git a/src/tools/docmaker/content.py b/src/tools/docmaker/content.py
index 28fc85d..ed3516c 100644
--- a/src/tools/docmaker/content.py
+++ b/src/tools/docmaker/content.py
@@ -369,7 +369,7 @@ class  DocSection:
                 self.title       = title
                 self.abstract    = block.get_markup_words( "abstract" )
                 self.description = block.get_markup_items( "description" )
-                self.order       = block.get_markup_words( "order" )
+                self.order       = block.get_markup_words_all( "order" )
                 return
 
     def  reorder( self ):
@@ -607,6 +607,15 @@ class  DocBlock:
         except:
             return []
 
+    def  get_markup_words_all( self, tag_name ):
+        try:
+            m = self.get_markup( tag_name )
+            return [word
+                      for items in m.fields[0].items
+                        for word in items.words]
+        except:
+            return []
+
     def  get_markup_text( self, tag_name ):
         result = self.get_markup_words( tag_name )
         return string.join( result )