forked from mystiq/hydrogen-web
Put regex into separate file
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
6f0362802a
commit
31740f4ec6
2 changed files with 2 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
|
||||
import { regex } from "./regex.js";
|
||||
|
||||
export function linkify(text, callback) {
|
||||
const matches = text.matchAll(regex);
|
||||
|
|
1
src/domain/session/room/timeline/linkify/regex.js
Normal file
1
src/domain/session/room/timeline/linkify/regex.js
Normal file
|
@ -0,0 +1 @@
|
|||
export const regex = /(?:https|http|ftp):\/\/[a-zA-Z0-9:.\[\]#-]+(?:[\/#][^\s]*[^\s.,?!]|[^\s\u{80}-\u{10ffff}.,?!])/gui
|
Loading…
Reference in a new issue