jrblevin/markdown-mode

Links in angle brackets <urlscheme://example>

vibrog opened this issue · 3 comments

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://>

Screenshot 2023-02-26 at 15 10 23

Screen capture of Markdown mode version 2.6-alpha

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.

syohex commented

I have merged #751