Links in angle brackets <urlscheme://example>
vibrog opened this issue · 3 comments
vibrog commented
Highlight links in angle brackets <urlscheme://example>
, according to
https://spec.commonmark.org/0.30/#link-destination
https://www.markdownguide.org/basic-syntax#urls-and-email-addresses
syohex commented
I suppose markdown-mode
already implements highlighting links in angle brackets. Could you show us reproduce markdown text of your issue ?
vibrog commented
Examples
- https://example.com/ // <https://example.com/>
- mailto:nobody@example.com // <mailto:nobody@example.com>
- uri://example.com // <uri://example.com>
- tel:+555 // <tel:+555>
- geo:59.5,11.0 // <geo:59.5,11.0>
- irc://example.com/channel // <irc://example.com/channel>
- <x-web-search://>
- <x-apple-reminder://>
Generic URIs
I think that all links inside <>-brackets should support any URL starting with any legal URI scheme, not just URI-schemes known to Markdown-mode. It is still convenient that Markdown-mode will linkify well-known URIs typed without the <>-brackets. According to RFC3986:
scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
So essentially match this regexp: <[a-z][a-z0-9.+-]:[^>]*>
See also Uniform Resource Identifier (URI) on Wikipedia.