Permalink
Browse files

Color: Use \x1B instead of \033 because of CoffeeScript 1.3.x compila…

…tion error
  • Loading branch information...
1 parent cc98471 commit fa52f7a672dfaac5a8183d70bd2b2ebe10506d3f @arikon arikon committed Jun 12, 2012
Showing with 4 additions and 3 deletions.
  1. +1 −1 lib/color.js
  2. +3 −2 src/color.coffee
View
2 lib/color.js
@@ -20,5 +20,5 @@ colors = {
};
exports.Color = function(c, str) {
- return ['\033[', colors[c], 'm', str, '\033[m'].join('');
+ return ['\x1B[', colors[c], 'm', str, '\x1B[m'].join('');
};
View
5 src/color.coffee
@@ -17,8 +17,9 @@ colors =
white: '1;37'
exports.Color = (c, str) ->
+ # Use \x1B instead of \033 because of CoffeeScript 1.3.x compilation error
[
- '\033[', colors[c], 'm'
+ '\x1B[', colors[c], 'm'
str
- '\033[m'
+ '\x1B[m'
].join ''

0 comments on commit fa52f7a

Please sign in to comment.