Modified regex to allow unicode in fragment
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
e20810b0cb
commit
027f6020e7
1 changed files with 1 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
const regex = /(?:https|http|ftp):\/\/[a-zA-Z0-9:.\[\]#-]+(?:\/[^\s]*[^\s.,?!]|[^\s\u{80}-\u{10ffff}.,?!])/gui
|
const regex = /(?:https|http|ftp):\/\/[a-zA-Z0-9:.\[\]#-]+(?:[\/#][^\s]*[^\s.,?!]|[^\s\u{80}-\u{10ffff}.,?!])/gui
|
||||||
|
|
||||||
export function linkify(text, callback) {
|
export function linkify(text, callback) {
|
||||||
const matches = text.matchAll(regex);
|
const matches = text.matchAll(regex);
|
||||||
|
|
Reference in a new issue