From 80bfeb1c3b1050273b2b87a4fd7de6b0cddc96d1 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 1 Dec 2014 10:07:52 +0100 Subject: [PATCH] [docmaker] Don't output a block multiple times. This bug was hidden by not processing all lines of `' blocks. * src/tools/docmaker/formatter.py (Formatter::section_dump): Filter out field names. --- ChangeLog | 9 +++++++++ src/tools/docmaker/formatter.py | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index fef862e46..535f07aa0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2014-11-29 Werner Lemberg + + [docmaker] Don't output a block multiple times. + + This bug was hidden by not processing all lines of `' blocks. + + * src/tools/docmaker/formatter.py (Formatter::section_dump): Filter + out field names. + 2014-11-29 Werner Lemberg [docmaker] Use field values as HTML link targets where possible. diff --git a/src/tools/docmaker/formatter.py b/src/tools/docmaker/formatter.py index 7cb68b2b7..45b338420 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!