Skip to content

Commit 61181b2

Browse files
author
Rosa Hase
committed
fix regex parsing of range of wiki links
.FIXES #1
1 parent 2bcf788 commit 61181b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

obsidian_interactive_graph/plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def collect_pages(self, nav: MkDocsNav, config: MkDocsConfig):
5555

5656
def parse_markdown(self, markdown: str, page: MkDocsPage):
5757
# wikilinks: [[Link#Anchor|Custom Text]], just the link is needed
58-
WIKI_PATTERN = re.compile(r"(?<!\!)\[\[(?P<wikilink>[^\|^\]^\#]{1,})(?:.*)\]\]")
58+
WIKI_PATTERN = re.compile(r"(?<!\!)\[\[(?P<wikilink>[^\|^\]^\#]{1,})(?:.*?)\]\]")
5959
for match in re.finditer(WIKI_PATTERN, markdown):
6060
wikilink = match.group('wikilink')
6161

0 commit comments

Comments
 (0)