orbikm / mkdocs-ezlinks-plugin

Plugin for mkdocs which enables easier linking between pages
MIT License
34 stars 17 forks source link

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

Open Andygol opened 1 year ago

Andygol commented 1 year ago

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

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

Andygol commented 1 year ago

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