diff --git a/pelican/plugins/obsidian/obsidian.py b/pelican/plugins/obsidian/obsidian.py index ef53ade..673d7f0 100644 --- a/pelican/plugins/obsidian/obsidian.py +++ b/pelican/plugins/obsidian/obsidian.py @@ -12,13 +12,15 @@ from markdown import Markdown ARTICLE_PATHS = {} FILE_PATHS = {} -link = r'\[\[\s*(?P[^|\]]+)(\|\s*(?P.+))?\]\]' +#link = r'\[\[\s*(?P[^|\]]+)(\|\s*(?P.+))?\]\]' # greedy, broken multiple same line +link = r'\[\[\s*(?P[^|\]]+?)(\|\s*(?P.+?))?\]\]' # non-greedy file_re = re.compile(r'!' + link) link_re = re.compile(link) """ # Test cases +be sure to check the [[The Useless Room|electronics room]] and [[Incubation Room]] [[my link]] [[ my work ]] [[ my work | is finished ]]