Fix issue with orgmode interferring with forward links.

This commit is contained in:
Flancian 2021-01-09 20:37:15 +01:00
parent 10a48a1cbd
commit 446a2d0791
1 changed files with 3 additions and 1 deletions

View File

@ -309,7 +309,9 @@ def content_to_forward_links(content):
# hack hack.
match = RE_WIKILINKS.findall(content)
if match:
return [util.canonical_wikilink(m) for m in match]
# Work around broken forward links due to org mode convention I didn't think of.
# TODO: make link parsing format-aware.
return [util.canonical_wikilink(m) for m in match if '][' not in m]
else:
return []