mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-15 11:09:01 +08:00
fix(markpasterule): parent is undefined for mark
This commit is contained in:
parent
92eb2c61cc
commit
463fd91eba
@ -16,7 +16,7 @@ export default function (regexp, type, getAttrs) {
|
|||||||
|
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
while (!isLink && (match = regexp.exec(text)) !== null) {
|
while (!isLink && (match = regexp.exec(text)) !== null) {
|
||||||
if (parent.type.allowsMarkType(type) && match[1]) {
|
if (parent && parent.type.allowsMarkType(type) && match[1]) {
|
||||||
const start = match.index
|
const start = match.index
|
||||||
const end = start + match[0].length
|
const end = start + match[0].length
|
||||||
const textStart = start + match[0].indexOf(match[1])
|
const textStart = start + match[0].indexOf(match[1])
|
||||||
|
Loading…
Reference in New Issue
Block a user