mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-05 04:19:07 +08:00
fix whitespace
This commit is contained in:
parent
a7d3af30bb
commit
c5d7ef4e79
@ -28,6 +28,7 @@ function triggerCharacter({
|
||||
// JavaScript doesn't have lookbehinds; this hacks a check that first character is " "
|
||||
// or the line beginning
|
||||
const matchPrefix = match.input.slice(Math.max(0, match.index - 1), match.index)
|
||||
|
||||
if (/^[\s\0]?$/.test(matchPrefix)) {
|
||||
// The absolute position of the match in the document
|
||||
const from = match.index + $position.start()
|
||||
@ -52,8 +53,10 @@ function triggerCharacter({
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
match = regexp.exec(text)
|
||||
}
|
||||
|
||||
return position
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user