[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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
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 )