This commit is contained in:
Jon Noronha 2022-03-24 12:32:59 -07:00 committed by bdbch
parent b7c3b113dd
commit 1dbd26c828

View File

@ -32,7 +32,11 @@ export function findSuggestionMatch(config: Trigger): SuggestionMatch {
: new RegExp(`${prefix}(?:^)?${escapedChar}[^\\s${escapedChar}]*`, 'gm')
const text = $position.nodeBefore?.isText && $position.nodeBefore.text
if (!text) return null
if (!text) {
return null
}
const textFrom = $position.pos - text.length
const match = Array.from(text.matchAll(regexp)).pop()