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

Open
mercury233 opened this issue Nov 9, 2022 · 1 comment

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>

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

2 participants