getLineTokens must clone the ruleStack

This commit is contained in:
Corey Johnson & Nathan Sobo 2012-09-28 09:40:06 -07:00
parent ae4db9d238
commit 3a66aab59d

View File

@ -26,6 +26,7 @@ class TextMateGrammar
@repository[name] = new Rule(this, data)
getLineTokens: (line, stack=[@initialRule]) ->
stack = new Array(stack...) # clone stack
tokens = []
position = 0