mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
Put regex into separate file
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
6f0362802a
commit
31740f4ec6
@ -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) {
|
export function linkify(text, callback) {
|
||||||
const matches = text.matchAll(regex);
|
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 New Issue
Block a user