Skip to content

Commit

Permalink
Fix .file() coloring
Browse files Browse the repository at this point in the history
  • Loading branch information
gmetais committed Feb 17, 2015
1 parent 4ff0145 commit bfd1d8c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/template.js
Expand Up @@ -168,13 +168,8 @@ if (!window._unusedjs) {
var isUnused = unusedChars[unusedChars.length - 1];
var lastChange = unusedChars.lastIndexOf(1 - isUnused) + 1;
unusedChars = unusedChars.slice(0, lastChange);
transformedLineOfCode = remainingLineOfCode.substr(lastChange) + transformedLineOfCode;

if (lastChange > 0) {
colorsArgs.push(isUnused ? CONSOLE_STYLE_UNUSED : CONSOLE_STYLE_USED);
transformedLineOfCode = '%c' + transformedLineOfCode;
}

transformedLineOfCode = '%c' + remainingLineOfCode.substr(lastChange) + transformedLineOfCode;
colorsArgs.push(isUnused ? CONSOLE_STYLE_UNUSED : CONSOLE_STYLE_USED);
remainingLineOfCode = remainingLineOfCode.substr(0, lastChange);
}

Expand Down

0 comments on commit bfd1d8c

Please sign in to comment.