mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-11 04:48:44 +03:00
Anchor second capture index
This commit is contained in:
parent
9f6d1f987f
commit
4c1ecf61df
@ -165,7 +165,7 @@ class Pattern
|
||||
return false unless @regexSource
|
||||
escape = false
|
||||
for character in @regexSource.split('')
|
||||
return true if escape and (character is 'A' or character is 'G' or character is 'z')
|
||||
return true if escape and 'AGz'.indexOf(character) isnt -1
|
||||
escape = not escape and character is '\\'
|
||||
false
|
||||
|
||||
@ -224,7 +224,7 @@ class Pattern
|
||||
tokens = [new Token(value: line[start...end], scopes: scopes)]
|
||||
if @pushRule
|
||||
ruleToPush = @pushRule.getRuleToPush(line, captureIndices)
|
||||
ruleToPush.anchor = captureIndices[1]
|
||||
ruleToPush.anchor = captureIndices[2]
|
||||
stack.push(ruleToPush)
|
||||
else if @popRule
|
||||
stack.pop()
|
||||
|
Loading…
Reference in New Issue
Block a user