improve link regex

This commit is contained in:
Philipp Kühn 2020-11-13 09:07:51 +01:00
parent 0ca99d7b71
commit 6d73e60bfb

View File

@ -9,7 +9,7 @@ export interface LinkOptions {
rel: string,
}
export const pasteRegex = /https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b(?:[-a-zA-Z0-9@:%_+.~#?&//=]*)/gi
export const pasteRegex = /https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b(?:[-a-zA-Z0-9@:%._+~#=?!&/()]*)/gi
const Link = createMark({
name: 'link',