From 482f27ff50ccdcb211a261a1113aec479fcad303 Mon Sep 17 00:00:00 2001 From: Hoffelhas Date: Tue, 24 Aug 2021 14:49:34 +0200 Subject: [PATCH] Added hotfix for detection of underscore replacement of the exclamation mark --- autodoist.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autodoist.py b/autodoist.py index b31b528..2c7848c 100644 --- a/autodoist.py +++ b/autodoist.py @@ -378,10 +378,12 @@ def check_header(level): method = 0 try: + # Support for legacy structure name = level['name'] method = 1 except: try: + # Current structure content = level['content'] method = 2 except: @@ -391,14 +393,14 @@ def check_header(level): if name[:3] == '** ': header_all_in_level = True level.update(name=name[3:]) - if name[:3] == '!* ': + if name[:3] == '!* ' or name[:3] == '_* ': unheader_all_in_level = True level.update(name=name[3:]) elif method == 2: if content[:3] == '** ': header_all_in_level = True level.update(content=content[3:]) - if content[:3] == '!* ': + if content[:3] == '!* ' or content[:3] == '_* ': unheader_all_in_level = True level.update(content=content[3:]) else: