Compare commits
No commits in common. "bfe60271eb773ce4f1897918c7875fe8140003e0" and "05718e1001ca9e0dee45aae3e9ed9df34728e7c3" have entirely different histories.
bfe60271eb
...
05718e1001
@ -103,7 +103,7 @@ PLANNING_RE = re.compile(
|
||||
r")+\s*"
|
||||
)
|
||||
LIST_ITEM_RE = re.compile(
|
||||
r"(?P<indentation>\s*)((?P<bullet>[*\-+])|((?P<counter>\d|[a-zA-Z])(?P<counter_sep>[.)]))) ((?P<checkbox_indentation>\s*)\[(?P<checkbox_value>[ Xx])\])?((?P<tag_indentation>\s*)((?P<tag>.*?)\s::))?(?P<content>.*)"
|
||||
r"(?P<indentation>\s*)((?P<bullet>[*\-+])|((?P<counter>\d|[a-zA-Z])(?P<counter_sep>[.)]))) ((?P<checkbox_indentation>\s*)\[(?P<checkbox_value>[ Xx])\])?((?P<tag_indentation>\s*)(?P<tag>.*?)::)?(?P<content>.*)"
|
||||
)
|
||||
|
||||
IMPLICIT_LINK_RE = re.compile(r"(https?:[^<> ]*[a-zA-Z0-9])")
|
||||
@ -1911,12 +1911,7 @@ def tokenize_contents(contents: str) -> List[TokenItems]:
|
||||
continue
|
||||
|
||||
# Possible link close or open of description
|
||||
if (
|
||||
char == "]"
|
||||
and len(contents) > i + 1
|
||||
and in_link
|
||||
and contents[i + 1] in "]["
|
||||
):
|
||||
if char == "]" and len(contents) > i + 1 and in_link:
|
||||
if contents[i + 1] == "]":
|
||||
cut_string()
|
||||
|
||||
@ -1967,7 +1962,6 @@ def tokenize_contents(contents: str) -> List[TokenItems]:
|
||||
cut_string()
|
||||
tokens.append((TOKEN_TYPE_CLOSE_MARKER, char))
|
||||
has_changed = True
|
||||
closes.remove(i)
|
||||
|
||||
if not has_changed:
|
||||
text.append(char)
|
||||
@ -2058,7 +2052,7 @@ def dump_contents(raw):
|
||||
content = "\n".join(content_lines)
|
||||
checkbox = f"[{raw.checkbox_value}]" if raw.checkbox_value else ""
|
||||
tag = (
|
||||
f"{raw.tag_indentation}{token_list_to_raw(raw.tag or '')} ::"
|
||||
f"{raw.tag_indentation}{token_list_to_raw(raw.tag or '')}::"
|
||||
if raw.tag or raw.tag_indentation
|
||||
else ""
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user