fix bug in suggestions plugin, fix #176
This commit is contained in:
@@ -10,6 +10,11 @@ function triggerCharacter({
|
|||||||
}) {
|
}) {
|
||||||
|
|
||||||
return $position => {
|
return $position => {
|
||||||
|
// cancel if top level node
|
||||||
|
if ($position.depth <= 0) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
// Matching expressions used for later
|
// Matching expressions used for later
|
||||||
const escapedChar = `\\${char}`
|
const escapedChar = `\\${char}`
|
||||||
const suffix = new RegExp(`\\s${escapedChar}$`)
|
const suffix = new RegExp(`\\s${escapedChar}$`)
|
||||||
|
|||||||
Reference in New Issue
Block a user