From facd7082d08e346b1ec31e359da32b55d8ae8716 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Mon, 14 May 2012 13:30:09 -0700 Subject: [PATCH] optimization: only tokens containing tabs are split into multiple tokens --- src/app/token.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/token.coffee b/src/app/token.coffee index 75bc588d2..2e2d89f66 100644 --- a/src/app/token.coffee +++ b/src/app/token.coffee @@ -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)