diff --git a/src/domain/session/room/timeline/linkify/linkify.js b/src/domain/session/room/timeline/linkify/linkify.js index bcc722a4..6ebf4e9f 100644 --- a/src/domain/session/room/timeline/linkify/linkify.js +++ b/src/domain/session/room/timeline/linkify/linkify.js @@ -1,4 +1,4 @@ -const regex = /(?:https|http|ftp):\/\/[a-zA-Z0-9:.\[\]#-]+(?:[\/#][^\s]*[^\s.,?!]|[^\s\u{80}-\u{10ffff}.,?!])/gui +import { regex } from "./regex.js"; export function linkify(text, callback) { const matches = text.matchAll(regex); diff --git a/src/domain/session/room/timeline/linkify/regex.js b/src/domain/session/room/timeline/linkify/regex.js new file mode 100644 index 00000000..fe8c94eb --- /dev/null +++ b/src/domain/session/room/timeline/linkify/regex.js @@ -0,0 +1 @@ +export const regex = /(?:https|http|ftp):\/\/[a-zA-Z0-9:.\[\]#-]+(?:[\/#][^\s]*[^\s.,?!]|[^\s\u{80}-\u{10ffff}.,?!])/gui