mirror of https://github.com/Hoffelhas/autodoist
Added hotfix for detection of underscore replacement of the exclamation mark
parent
2dd6f06b13
commit
482f27ff50
|
@ -378,10 +378,12 @@ def check_header(level):
|
||||||
method = 0
|
method = 0
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
# Support for legacy structure
|
||||||
name = level['name']
|
name = level['name']
|
||||||
method = 1
|
method = 1
|
||||||
except:
|
except:
|
||||||
try:
|
try:
|
||||||
|
# Current structure
|
||||||
content = level['content']
|
content = level['content']
|
||||||
method = 2
|
method = 2
|
||||||
except:
|
except:
|
||||||
|
@ -391,14 +393,14 @@ def check_header(level):
|
||||||
if name[:3] == '** ':
|
if name[:3] == '** ':
|
||||||
header_all_in_level = True
|
header_all_in_level = True
|
||||||
level.update(name=name[3:])
|
level.update(name=name[3:])
|
||||||
if name[:3] == '!* ':
|
if name[:3] == '!* ' or name[:3] == '_* ':
|
||||||
unheader_all_in_level = True
|
unheader_all_in_level = True
|
||||||
level.update(name=name[3:])
|
level.update(name=name[3:])
|
||||||
elif method == 2:
|
elif method == 2:
|
||||||
if content[:3] == '** ':
|
if content[:3] == '** ':
|
||||||
header_all_in_level = True
|
header_all_in_level = True
|
||||||
level.update(content=content[3:])
|
level.update(content=content[3:])
|
||||||
if content[:3] == '!* ':
|
if content[:3] == '!* ' or content[:3] == '_* ':
|
||||||
unheader_all_in_level = True
|
unheader_all_in_level = True
|
||||||
level.update(content=content[3:])
|
level.update(content=content[3:])
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue