fix exponential backtracking in regex

This commit is contained in:
Salihu
2026-08-09 20:44:54 +01:00
parent 9ba93c87c0
commit bf3d1bf3c0
+2 -1
View File
@@ -15,7 +15,8 @@ export interface TabsOptions {
view: ComponentType<ReactNodeViewProps<HTMLElement>> | null;
}
const TAB_INPUT_REGEX = /^\s*===\s*["'“”‘’]((?:\\.|[^"'“”‘’\n])+?)["'“”‘’]\s+$/;
const TAB_INPUT_REGEX =
/^\s*===\s*["'“”‘’]((?:\\["\\]|[^\\"'“”‘’\n])+?)["'“”‘’]\s+$/;
declare module '@tiptap/core' {
interface Commands<ReturnType> {