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

Links preceded by emojis are not rendered #108

Open Stormtv opened 1 year ago

Stormtv commented 1 year ago

Playground Link: http://markdown-it.github.io/linkify-it/#t1=%F0%9F%9A%80https%3A%2F%2Fgoogle.com%0A%0A%F0%9F%9A%80%20https%3A%2F%2Fgoogle.com

Potential fix could be to add \p{Extended_Pictographic} into the schema_test & schema_match

self.re.schema_test = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');

self.re.schema_test = RegExp('(^|(?!_)(?:[><\uff5c]|[\p{Extended_Pictographic}]|' + re.src_ZPCc + '))(' + slist + ')', 'i');


I personally think this is strange to match on this but it matches the functionality of other social media sites.