Allow more characters in file names

Before it would break on my-file for example
This commit is contained in:
Tanner Collin 2022-04-22 16:05:39 -06:00
parent 7ee02b03d1
commit 81d8607411

View File

@ -12,7 +12,7 @@ from markdown import Markdown
ARTICLE_PATHS = {}
FILE_PATHS = {}
link = r'\[\[\s*(?P<filename>[\w+\s.]+)(\|\s*(?P<linkname>[\w\s]+))?\]\]'
link = r'\[\[\s*(?P<filename>[^|\]]+)(\|\s*(?P<linkname>.+))?\]\]'
file_re = re.compile(r'!' + link)
link_re = re.compile(link)