diff --git a/org_rw/org_rw.py b/org_rw/org_rw.py index 939ae9b..1f0df7a 100644 --- a/org_rw/org_rw.py +++ b/org_rw/org_rw.py @@ -1768,16 +1768,16 @@ def parse_headline(hl, doc, parent) -> Headline: title = line is_done = is_todo = False for state in doc.todo_keywords or []: - if title.startswith(state['name'] + " "): + if title.startswith(state + " "): hl_state = state - title = title[len(state['name'] + " ") :] + title = title[len(state + " ") :] is_todo = True break else: for state in doc.done_keywords or []: - if title.startswith(state['name'] + " "): + if title.startswith(state + " "): hl_state = state - title = title[len(state['name'] + " ") :] + title = title[len(state + " ") :] is_done = True break @@ -1993,7 +1993,7 @@ class OrgDoc: state = "" if headline.state: - state = headline.state['name'] + " " + state = headline.state + " " raw_title = token_list_to_raw(headline.title.contents) tags_padding = ""