Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong result when parsing CJK(中文/日文/韩文) char followed by colon #394

Closed
mercury233 opened this issue Nov 9, 2022 · 3 comments

Comments

@mercury233
Copy link

const Autolinker = require("autolinker")
const autolinker = new Autolinker({
	urls: {
		schemeMatches: true,
		tldMatches: false,
		ipV4Matches: false
	},
	newWindow: false,
	stripPrefix: false,
	email: false,
	phone: false,
	stripTrailingSlash: false
});

console.log(autolinker.link("链接:https://www.google.com"));
console.log(autolinker.link("link:https://www.google.com"));
console.log(autolinker.link("链接: https://www.google.com"));
console.log(autolinker.link("链接:https://www.google.com"));

image

https://runkit.com/embed/xpmv085le79y

The 4th result is wrong

@keisukekomeda
Copy link

Similar example here.

console.log(Autolinker.link("こちら→https://google.com"))
// result: こちら→https://g<a href="http://oogle.com" target="_blank" rel="noopener noreferrer">oogle.com</a>

@gregjacobs
Copy link
Owner

This is now fixed in 4.0.1. Thanks for reporting!

@gregjacobs
Copy link
Owner

This is now fixed in 4.0.1. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants