Skip to content
This repository
Browse code

Merge pull request #40 from tmsh/master

In addition to 256-xterm ansi colors, handle 24-bit colors.
  • Loading branch information...
commit db9f235d50680d7bdcdd0e42f1c85ab1de273ed1 2 parents 52d1db7 + 28c39e3
Guillermo Rauch guille authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  lib/cli-table/utils.js
2  lib/cli-table/utils.js
@@ -77,7 +77,7 @@ exports.options = options;
77 77 // see: http://en.wikipedia.org/wiki/ANSI_escape_code
78 78 //
79 79 exports.strlen = function(str){
80   - var code = /\u001b\[(?:\d*;){0,2}\d*m/g;
  80 + var code = /\u001b\[(?:\d*;){0,5}\d*m/g;
81 81 var stripped = ("" + str).replace(code,'');
82 82 var split = stripped.split("\n");
83 83 return split.reduce(function (memo, s) { return (s.length > memo) ? s.length : memo }, 0);

0 comments on commit db9f235

Please sign in to comment.
Something went wrong with that request. Please try again.