Handle new headline state type.

This commit is contained in:
Sergio Martínez Portela 2024-08-22 20:31:17 +02:00
parent 2f3c52f5f2
commit 9a6d0191d7

View File

@ -736,10 +736,10 @@ def render(headline, doc, graph, headlineLevel, doc_to_headline_remapping):
content.append(render(child, doc, headlineLevel=headlineLevel+1, graph=graph,
doc_to_headline_remapping=doc_to_headline_remapping))
if headline.state is None:
if headline.state is None or headline.state.get('name') is None:
state = ""
else:
state = f'<span class="state todo-{headline.is_todo} state-{headline.state}">{headline.state}</span>'
state = f'<span class="state todo-{headline.is_todo} state-{headline.state["name"]}">{headline.state["name"]}</span>'
if headline.is_todo:
todo_state = "todo"