improve code input rule

This commit is contained in:
Philipp Kühn
2020-09-10 13:50:40 +02:00
parent 49593ac4fc
commit 17a6d56a31
3 changed files with 34 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ export default function (regexp: RegExp, markType: MarkType, getAttrs?: Function
if (match[m]) {
const matchStart = start + match[0].indexOf(match[m - 1])
const matchEnd = matchStart + match[m - 1].length - 1
const matchEnd = matchStart + match[m - 1].length
const textStart = matchStart + match[m - 1].lastIndexOf(match[m])
const textEnd = textStart + match[m].length