From 661a5e0cf85b09d240d49c9e4a1833ad16097337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Mon, 26 Jun 2023 23:56:32 +0200 Subject: [PATCH] Add centered graph as first element. --- scripts/generate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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))