matthewhchan / linkify

MIT License
38 stars 8 forks source link

Default regular expressions could be expanded to include more legal values #5

Closed claremacrae closed 2 years ago

claremacrae commented 2 years ago

Hi, this looks really useful. Thank you.

Based on the screenshots in the README as of bd31387a9656e6c26ad4398dca4856746946874b, I believe that some valid patterns are not found.

In case it's useful, here are some rules for the allowed characters in some of the default link patterns the plugin sets up. The current default rules exclude some valid characters, I believe.

GitHub user names - digits are allowed: https://github.com/shinnn/github-username-regex

Twitter user names - digits are allowed: https://help.twitter.com/en/managing-your-account/twitter-username-rules

matthewhchan commented 2 years ago

Thank you for pointing that out! I've updated the default regular expressions (version 1.0.11).

claremacrae commented 2 years ago

Thanks @matthewhchan! In case you didn't, and care, it's worth checking the links, as there are other rules than just the digits. (Sorry I didn't make it clear they were examples)