From 347ef0c010baa9051ef5379cec662a4fbc3e8e11 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 16 Apr 2015 17:38:53 -0700 Subject: [PATCH] minor. --- lib/unicode.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/unicode.js b/lib/unicode.js index 77d2fa6..51a73ef 100644 --- a/lib/unicode.js +++ b/lib/unicode.js @@ -116,7 +116,7 @@ exports.charWidth = function(str, i) { // search table of non-spacing characters // is ucs combining or C0/C1 control character - if (exports.isNonSpacing(point)) { + if (exports.combining[point]) { return 0; } @@ -567,7 +567,7 @@ exports.combiningRegex = exports.combiningTable.reduce(function(out, row) { hexify(high.charCodeAt(1)) ]; range = '[\\u' + low[0] + '-' + '\\u' + high[0] + ']' - + '[\\u' + low[1] + '-' + '\\u' + high[1] + ']'; + + '[\\u' + low[1] + '-' + '\\u' + high[1] + ']'; if (!~out.indexOf('|')) out += ']'; out += '|' + range; } else {