mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-07 08:09:01 +02:00
get rid of confusing regex
This commit is contained in:
+1
-1
@@ -162,7 +162,7 @@ define [
|
||||
cursorPosition = @editor.getCursorPosition()
|
||||
end = change.end
|
||||
{lineUpToCursor, commandFragment} = Helpers.getContext(@editor, end)
|
||||
if lineUpToCursor.match(/.*((?![\\]).|^)%.*/)
|
||||
if (i = lineUpToCursor.indexOf('%') > -1 and lineUpToCursor[i-1] != '\\')
|
||||
return
|
||||
lastCharIsBackslash = lineUpToCursor.slice(-1) == "\\"
|
||||
lastTwoChars = lineUpToCursor.slice(-2)
|
||||
|
||||
Reference in New Issue
Block a user