[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.
This commit is contained in:
parent
16b3e62013
commit
785b1d0892
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
|||
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.
|
||||
|
|
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue