From b2c8fea738180549e8cb70e929633774102730f8 Mon Sep 17 00:00:00 2001 From: inconstxpr Date: Sat, 16 Jan 2021 18:17:06 -0300 Subject: [PATCH] Fixed doxygenfile causing duplicate IDs. Moved section option check before calling render on sub sections. --- breathe/renderer/sphinxrenderer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/breathe/renderer/sphinxrenderer.py b/breathe/renderer/sphinxrenderer.py index 157f37db9..e9a7f9744 100644 --- a/breathe/renderer/sphinxrenderer.py +++ b/breathe/renderer/sphinxrenderer.py @@ -1165,13 +1165,13 @@ def render_derivedcompoundref(node): # Get all sub sections for sectiondef in node.sectiondef: + kind = sectiondef.kind + if section_order is not None and kind not in section_order: + continue child_nodes = self.render(sectiondef) if not child_nodes: # Skip empty section continue - kind = sectiondef.kind - if section_order is not None and kind not in section_order: - continue rst_node = nodes.container(classes=['breathe-sectiondef']) rst_node.document = self.state.document rst_node['objtype'] = kind