mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Push filler tokens when no patterns match an empty line
This ensures that empty lines always contain tokens even when no patterns match on empty lines.
This commit is contained in:
@@ -145,7 +145,7 @@ class TextMateGrammar
|
||||
break if position is line.length and nextTokens.length is 0 and ruleStack.length is previousRuleStackLength
|
||||
|
||||
else # push filler token for unmatched text at end of line
|
||||
if position < line.length
|
||||
if position < line.length or line.length == 0
|
||||
tokens.push(new Token(
|
||||
value: line[position...line.length]
|
||||
scopes: scopes
|
||||
|
||||
Reference in New Issue
Block a user