mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
optimization: only tokens containing tabs are split into multiple tokens
This commit is contained in:
@@ -17,6 +17,8 @@ class Token
|
||||
[new Token(value: value1, type: @type), new Token(value: value2, type: @type)]
|
||||
|
||||
breakOutTabCharacters: (tabText) ->
|
||||
return [this] unless /\t/.test(tabText)
|
||||
|
||||
for substring in @value.match(/([^\t]+|\t)/g)
|
||||
if substring == '\t'
|
||||
@buildTabToken(tabText)
|
||||
|
||||
Reference in New Issue
Block a user