markdown-it / linkify-it

Links recognition library with full unicode support
http://markdown-it.github.io/linkify-it/
MIT License
655 stars 63 forks source link

Is it possible to match add a rule definition based on suffix? #76

Closed Aerlinger closed 5 years ago

Aerlinger commented 5 years ago

Is it possible to add a schema rule based on the suffix of a word? For example, I'm looking to transform a username string of the form username@ to a url (e.g. something http://github.com/username).

It looks like the .add function matches a rule based on the prefix of a word only, so wasn't sure if this is possible.

puzrin commented 5 years ago

No, there are some limitations, because all this should work "fast".