mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-08 10:03:00 +08:00
fix(extension-code): remove negative lookbehind (#5916)
Some checks failed
build / lint (20) (push) Has been cancelled
build / test (20, map[name:Demos/Examples spec:./demos/src/Examples/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Experiments spec:./demos/src/Experiments/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Extensions spec:./demos/src/Extensions/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/GuideContent spec:./demos/src/GuideContent/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/GuideGettingStarted spec:./demos/src/GuideGettingStarted/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Marks spec:./demos/src/Marks/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Nodes spec:./demos/src/Nodes/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Integration spec:./tests/cypress/integration/**/*.spec.{js,ts}]) (push) Has been cancelled
Publish / Release (20) (push) Has been cancelled
build / build (20) (push) Has been cancelled
Some checks failed
build / lint (20) (push) Has been cancelled
build / test (20, map[name:Demos/Examples spec:./demos/src/Examples/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Experiments spec:./demos/src/Experiments/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Extensions spec:./demos/src/Extensions/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/GuideContent spec:./demos/src/GuideContent/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/GuideGettingStarted spec:./demos/src/GuideGettingStarted/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Marks spec:./demos/src/Marks/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Nodes spec:./demos/src/Nodes/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Integration spec:./tests/cypress/integration/**/*.spec.{js,ts}]) (push) Has been cancelled
Publish / Release (20) (push) Has been cancelled
build / build (20) (push) Has been cancelled
This commit is contained in:
parent
a8d37eeb42
commit
b08c94ce84
5
.changeset/itchy-carrots-melt.md
Normal file
5
.changeset/itchy-carrots-melt.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@tiptap/extension-code": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Implement `inputRegex` and `pasteRegex` while avoiding lookbehind for compatibility with safari versions older than 16.4
|
@ -42,12 +42,12 @@ declare module '@tiptap/core' {
|
|||||||
* This ensures that any text between backticks is formatted as code,
|
* This ensures that any text between backticks is formatted as code,
|
||||||
* regardless of the surrounding characters (exception being another backtick).
|
* regardless of the surrounding characters (exception being another backtick).
|
||||||
*/
|
*/
|
||||||
export const inputRegex = /(?<!`)`([^`]+)`(?!`)/
|
export const inputRegex = /(^|[^`])`([^`]+)`(?!`)/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Matches inline code while pasting.
|
* Matches inline code while pasting.
|
||||||
*/
|
*/
|
||||||
export const pasteRegex = /(?<!`)`([^`]+)`(?!`)/g
|
export const pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This extension allows you to mark text as inline code.
|
* This extension allows you to mark text as inline code.
|
||||||
|
Loading…
Reference in New Issue
Block a user