diff --git a/docs/src/demos/Extensions/Strike/index.spec.js b/docs/src/demos/Extensions/Strike/index.spec.js index ad51e03f..54db052b 100644 --- a/docs/src/demos/Extensions/Strike/index.spec.js +++ b/docs/src/demos/Extensions/Strike/index.spec.js @@ -51,7 +51,7 @@ context('/api/extensions/strike', () => { it('should make a striked text from the markdown shortcut', () => { cy.get('.ProseMirror') - .type('~Strike~') + .type('~~Strike~~') .find('s') .should('contain', 'Strike') }) diff --git a/docs/src/docPages/api/extensions/strike.md b/docs/src/docPages/api/extensions/strike.md index 15729c2e..4cff00dd 100644 --- a/docs/src/docPages/api/extensions/strike.md +++ b/docs/src/docPages/api/extensions/strike.md @@ -1,7 +1,7 @@ # Strike Use this extension to render ~~striked text~~. If you pass ``, ``, `` tags, or text with inline `style` attributes setting `text-decoration: line-through` in the editor’s initial content, they all will be rendered accordingly. -Type ~text between tildes~ and it will be magically ~~striked through~~ while you type. +Type ∼∼text between tildes∼∼ and it will be magically ~~striked through~~ while you type. ::: warning Restrictions The extension will generate the corresponding `` HTML tags when reading contents of the `Editor` instance. All text striked through, regardless of the method will be normalized to `` HTML tags. diff --git a/packages/extension-strike/index.ts b/packages/extension-strike/index.ts index 2f33e1cc..2813884e 100644 --- a/packages/extension-strike/index.ts +++ b/packages/extension-strike/index.ts @@ -10,8 +10,8 @@ declare module '@tiptap/core/src/Editor' { } } -export const inputRegex = /(?:^|\s)((?:~)((?:[^~]+))(?:~))$/gm -export const pasteRegex = /(?:^|\s)((?:~)((?:[^~]+))(?:~))/gm +export const inputRegex = /(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/gm +export const pasteRegex = /(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/gm export default new Mark() .name('strike')