parsedown
parsedown copied to clipboard
Markdown parser for tel: links too restrictive
Im my country, phone numbers look like this: +41 79 123 45 67.
This works fine in mobile browsers, but [phonelink](tel:+41 79 123 45 67) gets ignored by parsedown, which leads me to believe it is too restrictive in this case. Should be an easy fix, might attempt later.
In CommonMark, links with spaces are supported by either writing the URL encoded characters (i.e. %20), or by enclosing the link in angle brackets (e.g. [phonelink](<tel:+41 79 123 45 67>)).
Parsedown doesn't currently support the latter method properly, so we should fix that :)
The reason for not allowing raw spaces when the link is not enclosed in angle brackets, is that a space after the URL is used to denote the link title.
The "tel:" link type is not recognized by ParseDown as it's not in the whitelist. Easily fixed, I made a pull request. https://github.com/erusev/parsedown/pull/771