From fcd9854a17dab0cf9c4aee844f92432671563f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Thu, 20 Oct 2022 23:44:35 +0200 Subject: [PATCH] Disable collapsing top-level headline. --- scripts/generate.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/generate.py b/scripts/generate.py index 31b051b..e343401 100644 --- a/scripts/generate.py +++ b/scripts/generate.py @@ -445,7 +445,7 @@ def render_as_document(headline, doc, headlineLevel, title): Sending you to the main note... [{org_rw.token_list_to_plaintext(topLevelHeadline.title.contents)}] - """ + """ else: return as_document(render(headline, doc, headlineLevel), title) @@ -482,13 +482,16 @@ def render(headline, doc, headlineLevel): # display_state = 'expanded' display_state = 'expanded' + title = render_inline(headline.title, render_tag) + + if headlineLevel > 0: + title = f"{title}" + return f"""

{state} - - {render_inline(headline.title, render_tag)} - + {title} {tags}