Hypercontext / linkifyjs

JavaScript plugin for finding links in plain-text and converting them to HTML <a> tags.
https://linkify.js.org
MIT License
1.83k stars 182 forks source link

how to avoid detecting as link that start with 123http? #467

Closed zuizuihao closed 5 months ago

zuizuihao commented 9 months ago

when I test "123http://google.com", but in our scenario, this should not be recognized as a link. the result better to be 123http://google.com. any solution to avoid detect as link?

var htmlLinkify = linkifyHtml("123http://google.com");
console.log(htmlLinkify); //123<a href="http://google.com">http://google.com</a>
txdv commented 6 months ago

use https://linkify.js.org/docs/options.html#validate