mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-14 18:49:02 +08:00
Merge pull request #502 from Alecyrus/patch-2
Fixed InputRule deletes the next unrelated char that should not be deleted.
This commit is contained in:
commit
4054a9953e
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user