Skip to content

Commit db9f235

Browse files
committed
Merge pull request #40 from tmsh/master
In addition to 256-xterm ansi colors, handle 24-bit colors.
2 parents 52d1db7 + 28c39e3 commit db9f235

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/cli-table/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ exports.options = options;
7777
// see: http://en.wikipedia.org/wiki/ANSI_escape_code
7878
//
7979
exports.strlen = function(str){
80-
var code = /\u001b\[(?:\d*;){0,2}\d*m/g;
80+
var code = /\u001b\[(?:\d*;){0,5}\d*m/g;
8181
var stripped = ("" + str).replace(code,'');
8282
var split = stripped.split("\n");
8383
return split.reduce(function (memo, s) { return (s.length > memo) ? s.length : memo }, 0);

0 commit comments

Comments
 (0)