From 4c1ecf61df00735b23ebd5e51ff5d57401ac8407 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 20 Dec 2012 21:08:02 -0800 Subject: [PATCH] Anchor second capture index --- src/app/text-mate-grammar.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/text-mate-grammar.coffee b/src/app/text-mate-grammar.coffee index 52a71d2db..21ca0db6b 100644 --- a/src/app/text-mate-grammar.coffee +++ b/src/app/text-mate-grammar.coffee @@ -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()