Improve links matching

This commit is contained in:
Alexey Milovidov 2021-03-15 14:28:37 +03:00
parent 63bf066e2d
commit 4ad6cc3313

View File

@ -40,7 +40,7 @@ def replace_link(match, path):
if link.endswith('/'):
link = link[0:-1] + '.md'
return '[{}](#{})'.format(title, generate_anchor_from_path(os.path.normpath(os.path.join(os.path.dirname(path), link))))
return '{}(#{})'.format(title, generate_anchor_from_path(os.path.normpath(os.path.join(os.path.dirname(path), link))))
# Concatenates Markdown files to a single file.