shithub: freetype+ttf2subf

Download patch

ref: 785b1d0892ac042cadda3959f8783cd48b0334a6
parent: 16b3e620133a5a874a4e27c7b158187180cef13c
author: Werner Lemberg <[email protected]>
date: Sun Nov 30 17:16:34 EST 2014

[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.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
 2014-11-29  Werner Lemberg  <[email protected]>
 
+	[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  <[email protected]>
+
 	* src/tools/docmaker/sources.py (column) [Format 2]: Fix regexp.
 
 	After the single asterisk there must be no other immediately following
--- a/src/tools/docmaker/content.py
+++ b/src/tools/docmaker/content.py
@@ -369,7 +369,7 @@
                 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 ):
@@ -604,6 +604,15 @@
         try:
             m = self.get_markup( tag_name )
             return m.fields[0].items[0].words
+        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 []