fix whitespace
This commit is contained in:
@@ -28,6 +28,7 @@ function triggerCharacter({
|
|||||||
// JavaScript doesn't have lookbehinds; this hacks a check that first character is " "
|
// JavaScript doesn't have lookbehinds; this hacks a check that first character is " "
|
||||||
// or the line beginning
|
// or the line beginning
|
||||||
const matchPrefix = match.input.slice(Math.max(0, match.index - 1), match.index)
|
const matchPrefix = match.input.slice(Math.max(0, match.index - 1), match.index)
|
||||||
|
|
||||||
if (/^[\s\0]?$/.test(matchPrefix)) {
|
if (/^[\s\0]?$/.test(matchPrefix)) {
|
||||||
// The absolute position of the match in the document
|
// The absolute position of the match in the document
|
||||||
const from = match.index + $position.start()
|
const from = match.index + $position.start()
|
||||||
@@ -52,8 +53,10 @@ function triggerCharacter({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
match = regexp.exec(text)
|
match = regexp.exec(text)
|
||||||
}
|
}
|
||||||
|
|
||||||
return position
|
return position
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user