From b08c94ce8487edb9a4d0928727ede70ceb98003d Mon Sep 17 00:00:00 2001 From: Lino Le Van <11367844+lino-levan@users.noreply.github.com> Date: Thu, 5 Dec 2024 00:42:13 -0800 Subject: [PATCH] fix(extension-code): remove negative lookbehind (#5916) --- .changeset/itchy-carrots-melt.md | 5 +++++ packages/extension-code/src/code.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/itchy-carrots-melt.md diff --git a/.changeset/itchy-carrots-melt.md b/.changeset/itchy-carrots-melt.md new file mode 100644 index 0000000000..55db93214c --- /dev/null +++ b/.changeset/itchy-carrots-melt.md @@ -0,0 +1,5 @@ +--- +"@tiptap/extension-code": patch +--- + +Implement `inputRegex` and `pasteRegex` while avoiding lookbehind for compatibility with safari versions older than 16.4 diff --git a/packages/extension-code/src/code.ts b/packages/extension-code/src/code.ts index 73cbd65435..d9294ed5a2 100644 --- a/packages/extension-code/src/code.ts +++ b/packages/extension-code/src/code.ts @@ -42,12 +42,12 @@ declare module '@tiptap/core' { * This ensures that any text between backticks is formatted as code, * regardless of the surrounding characters (exception being another backtick). */ -export const inputRegex = /(?