mkdocs-ezlinks-plugin icon indicating copy to clipboard operation
mkdocs-ezlinks-plugin copied to clipboard

()[mailto:*] must be treated as a protocol to avoid link conversion

Open Andygol opened this issue 3 years ago • 1 comments

I faced with an issue when the markdown[[email protected]](mailto:[email protected]) was converted into relative link.

Unfortunately, I didn't find how to avoid conversion of e-mail protocol in the documentation. 😢

Andygol avatar Mar 27 '23 13:03 Andygol

It seems that here is missed a rule to check for mailto: protocol

https://github.com/orbikm/mkdocs-ezlinks-plugin/blob/508c0d399428f0d7ae596881900aa11baf508526/mkdocs_ezlinks_plugin/scanners/md_link_scanner.py#L33

It has to be somehow like that

-                    (?!(?P<md_protocol>[a-z][a-z0-9+\-.]*:\/\/))
+                    (?!(?P<md_protocol>(?:([a-z][a-z0-9+\-.]*:\/\/)|(mailto:))))

Andygol avatar Mar 27 '23 13:03 Andygol