-
Notifications
You must be signed in to change notification settings - Fork 474
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
Url should ignore the fullwidth code #378
Comments
Where should that symbol be ignored specifically? |
like (https://www.googoe.com/CN_UST);it's use fullwidth symbol |
To make sure i understood correctly: you'd like URI.withinString() to categorically exclude fullwidth characters ( This could be achieved by extending URI.findUri.end = /[\s\r\n]|[\uFF00-\uFFEF]|$/;
var text = "like (https://www.googoe.com/CN_UST);it's use fullwidth symbol `( `and` )`"
+ "\n"
+ "fullwith symbol should be ingore, like https://google.com,你好 "
+ "https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms";
var result = URI.withinString(text, url => {
console.log('found:', url);
return '<a>' + url + '</a>';
});
console.log('replaced:', result); which would output:
It should be noted that neither github's URL matcher, nor Chrome Dev Tools' URL matcher behaves that way. Both include fullwidth characters. Also, URL accepts fullwidth characters: var url = new URL("https://www.googoe.com/CN_UST);it's");
console.log(url.href);
// https://www.googoe.com/CN_UST%EF%BC%89%EF%BC%9Bit's |
fullwith symbol should be ingore, like https://google.com,你好
https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms
The text was updated successfully, but these errors were encountered: