-
Notifications
You must be signed in to change notification settings - Fork 177
Description
Standard URLs / URIs can contain commas or brackets. These are excluded from the markdown-regex-uri.
Expected Behavior
Take a link like this: https://en.wikipedia.org/wiki/File:L%C3%A1szl%C3%B3_Moholy-Nagy,_nuclear_II,_1946_(milwaukee_art_museum).jpg
Should become a clickable link when it occurs inline in the text, like in the github markdown right here.
Actual Behavior
It results in a broken link in markdown-mode when directly present in the text:
https://en.wikipedia.org/wiki/File:L%C3%A1szl%C3%B3_Moholy-Nagy,_nuclear_II,1946(milwaukee_art_museum).jpg
Steps to Reproduce
Paste the link https://en.wikipedia.org/wiki/File:L%C3%A1szl%C3%B3_Moholy-Nagy,_nuclear_II,_1946_(milwaukee_art_museum).jpg into a markdown file.
Then, this shows as a broken link.
Instead of
(defconst markdown-regex-uri
(concat "\\(" (regexp-opt markdown-uri-types) ":[^]\t\n\r<>,;() ]+\\)")
"Regular expression for matching inline URIs.")
you can write
(defconst markdown-regex-uri
(concat "\\(" (regexp-opt markdown-uri-types) ":[^]\t\n\r<>]+\\)")
"Regular expression for matching inline URIs.")
And after reopening the markdown file with the above url, it will inline correctly.
I don't know why these characters are excluded, so I may miss some side-effect here. Also one may want to exclude even less.