Create empty token on empty lines

This commit is contained in:
Corey Johnson
2012-08-09 15:17:46 -07:00
parent c1bd922d89
commit 7477511a9f

View File

@@ -34,9 +34,14 @@ class TextMateGrammar
position = 0
loop
scopes = _.pluck(stack, "scopeName")
if line.length == 0
tokens = [{value: "", scopes: scopes}]
return { tokens, scopes }
break if position == line.length
scopes = _.pluck(stack, "scopeName")
{ nextTokens, tokensStartPosition, tokensEndPosition} = _.last(stack).getNextTokens(stack, line, position)
if nextTokens