Trikzon / obsidian-frontmatter-links

An Obsidian plugin that renders links in a note's frontmatter as links.
MIT License
64 stars 8 forks source link

Weird parsing for list of unquoted links #17

Open regendo opened 1 year ago

regendo commented 1 year ago

I have this field in my frontmatter:

source:
 - https://stackoverflow.com/questions/641984/mysql-cant-access-root-account
 - https://stackoverflow.com/questions/41984956/cant-reset-root-password-with-skip-grant-tables-on-ubuntu-16

These links aren't recognized as links and are rendered as normal plaintext. As soon as I add a double-quote to the left of "https", all links from that quote onward are recognized, even if I never close the quote and even on later list items.

In this example, both links work even though they're not properly quoted. Adding a closing quote to the end of the first link doesn't change this behavior, both links are clickable.

source:
 - "https://stackoverflow.com/questions/641984/mysql-cant-access-root-account
 - https://stackoverflow.com/questions/41984956/cant-reset-root-password-with-skip-grant-tables-on-ubuntu-16

In this example, only the second link is clickable.

source:
 - https://stackoverflow.com/questions/641984/mysql-cant-access-root-account
 - "https://stackoverflow.com/questions/41984956/cant-reset-root-password-with-skip-grant-tables-on-ubuntu-16
Trikzon commented 1 year ago

Will investigate next week after finals. Link parsing is surprisingly difficult with many edge cases, but I have no idea why it wouldn't recognize those links