Commit 80bfeb1c3b1050273b2b87a4fd7de6b0cddc96d1

Werner Lemberg 2014-12-01T10:07:52

[docmaker] Don't output a block multiple times. This bug was hidden by not processing all lines of `<Order>' blocks. * src/tools/docmaker/formatter.py (Formatter::section_dump): Filter out field names.

diff --git a/ChangeLog b/ChangeLog
index fef862e..535f07a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2014-11-29  Werner Lemberg  <wl@gnu.org>
 
+	[docmaker] Don't output a block multiple times.
+
+	This bug was hidden by not processing all lines of `<Order>' blocks.
+
+	* src/tools/docmaker/formatter.py (Formatter::section_dump): Filter
+	out field names.
+
+2014-11-29  Werner Lemberg  <wl@gnu.org>
+
 	[docmaker] Use field values as HTML link targets where possible.
 
 	* src/tools/docmaker/tohtml.py (HtmlFormatter::make_block_url):
diff --git a/src/tools/docmaker/formatter.py b/src/tools/docmaker/formatter.py
index 7cb68b2..45b3384 100644
--- a/src/tools/docmaker/formatter.py
+++ b/src/tools/docmaker/formatter.py
@@ -182,7 +182,18 @@ class  Formatter:
         self.section_enter( section )
 
         for name in section.block_names:
+            skip_entry = 0
             block = self.identifiers[name]
+            # `block_names' can contain field names also, which we filter out
+            for markup in block.markups:
+                if markup.tag == 'values':
+                    for field in markup.fields:
+                        if field.name == name:
+                            skip_entry = 1
+
+            if skip_entry:
+              continue;
+
             self.block_enter( block )
 
             for markup in block.markups[1:]:   # always ignore first markup!