fix suggestions in safari browser

This commit is contained in:
Philipp Kühn 2018-09-30 20:20:18 +02:00
parent 52147de0be
commit a51d9a1b1a

View File

@ -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()