From c70306eaede914c36c0f482a289d8215cb4aafdf Mon Sep 17 00:00:00 2001 From: Alecyrus Date: Wed, 23 Oct 2019 17:17:28 +0800 Subject: [PATCH] Fixed InputRule deletes the next unrelated char. --- packages/tiptap-commands/src/commands/markInputRule.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tiptap-commands/src/commands/markInputRule.js b/packages/tiptap-commands/src/commands/markInputRule.js index 80893cf4f..46c75bf95 100644 --- a/packages/tiptap-commands/src/commands/markInputRule.js +++ b/packages/tiptap-commands/src/commands/markInputRule.js @@ -24,7 +24,7 @@ export default function (regexp, markType, getAttrs) { if (match[m]) { const matchStart = start + match[0].indexOf(match[m - 1]) - const matchEnd = matchStart + match[m - 1].length + const matchEnd = matchStart + match[m - 1].length - 1 const textStart = matchStart + match[m - 1].lastIndexOf(match[m]) const textEnd = textStart + match[m].length