Add brackets to URL regex

This commit is contained in:
Gregory Schier
2024-09-28 14:31:18 -07:00
parent 6583615885
commit f5e8c525e9

View File

@@ -3,7 +3,7 @@ import { Decoration, hoverTooltip, MatchDecorator, ViewPlugin } from '@codemirro
import { EditorView } from 'codemirror';
const REGEX =
/(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+*~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+*.~#?&/=]*))/g;
/(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+*~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+*.~#?&/={}[\]]*))/g;
const tooltip = hoverTooltip(
(view, pos, side) => {