mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-05 04:19:07 +08:00
fix suggestions in safari browser
This commit is contained in:
parent
52147de0be
commit
a51d9a1b1a
@ -13,8 +13,8 @@ function triggerCharacter({
|
||||
const suffix = new RegExp(`\\s${char}$`)
|
||||
const prefix = startOfLine ? '^' : ''
|
||||
const regexp = allowSpaces
|
||||
? new RegExp(`${prefix}${char}.*?(?=\\s${char}|$)`, 'g')
|
||||
: new RegExp(`${prefix}(?:^)?${char}[^\\s${char}]*`, 'g')
|
||||
? new RegExp(`${prefix}${char}.*?(?=\\s${char}|$)`, 'gm')
|
||||
: new RegExp(`${prefix}(?:^)?${char}[^\\s${char}]*`, 'gm')
|
||||
|
||||
// Lookup the boundaries of the current node
|
||||
const textFrom = $position.before()
|
||||
|
Loading…
Reference in New Issue
Block a user