obsidian-link-converter
obsidian-link-converter copied to clipboard
Issue when converting links that contain parenthesis
Hi,
I found your plugin really useful -- thank you for sharing.
I would like to let you know about an issue I found when converting markdown to wiki links if these contain parenthesis. The regular expression will incorrectly terminate on the first parenthesis found, thus chopping the link.
This is an example of the link format that will be handled incorrectly:
[some link title](../path/Smith, John (2001). Title Of Book.md)
With some quick testing, a greedy match between the parenthesis seems to match the entire contents correctly:
\[([^\]]*)\]\((.+)\)
Here's my test https://regexr.com/6ci5n
The greedy match might however fail with multiple links in the same line. Hopefully, though, it will serve to illustrate the problem.
Thanks again for your work, Jose