diff --git a/scripts/generate.py b/scripts/generate.py index 252efc8..cc18e2a 100644 --- a/scripts/generate.py +++ b/scripts/generate.py @@ -726,10 +726,11 @@ def render(headline, doc, graph, headlineLevel, doc_to_headline_remapping): print_tree(dom, indentation=2, headline=headline) content = [] - render_tree(dom, content, headline, graph) if headline.id and headlineLevel == 0: render_connections(headline.id, content, graph, doc_to_headline_remapping=doc_to_headline_remapping) + render_tree(dom, content, headline, graph) + for child in headline.children: content.append(render(child, doc, headlineLevel=headlineLevel+1, graph=graph, doc_to_headline_remapping=doc_to_headline_remapping))