On Fri, 18 Apr 2025 at 14:00, Juri Linkov <juri@linkov.net> wrote:
> I found one problem: some links are not highlighted
> when they contain parens. For example:
>
> [Lisp](https://en.wikipedia.org/wiki/Lisp)
> [Lisp](https://en.wikipedia.org/wiki/Lisp_(programming_language))
<somewhat tangent>
Links with a closing parenthesis in the URI are unlikely to be
reliably parsed by all markdown processors anyway. For
interoperability, I recommend this format:
[Lisp][1]
[1]: https://en.wikipedia.org/wiki/Lisp_(programming_language)
(This is also good for in-paragraph links, avoiding overlong lines.)
Would it be nicer to offer to encode escapable URL reserved characters; e.g., the embedded closing ) can be encoded as %29, opening paren as %28, embedded space as %20? Or using backslashes? While ugly, in our nice new markdown mode, the conversions could have a nice overlay that indicates it was encoded in the buffer and yet display as the original characters. It would also be nice for each document to use file locals to indicate the encoding preference.