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