fix combining check during unicode wrap.
This commit is contained in:
parent
53066c8f4c
commit
f8946a22f3
|
@ -447,7 +447,7 @@ exports.combining = exports.combiningTable.reduce(function(out, row) {
|
|||
return out;
|
||||
}, {});
|
||||
|
||||
exports.isNonSpacing = function(str, i) {
|
||||
exports.isCombining = function(str, i) {
|
||||
var point = typeof str !== 'number'
|
||||
? exports.codePointAt(str, i || 0)
|
||||
: str;
|
||||
|
|
|
@ -2736,14 +2736,14 @@ main:
|
|||
if (line[j] === ' '
|
||||
|| line[j] === '\x03'
|
||||
|| (unicode.isSurrogate(line, j - 1) && line[j + 1] !== '\x03')
|
||||
|| unicode.combining[line[j]]) {
|
||||
|| unicode.isCombining(line, j)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (line[j] === ' '
|
||||
|| line[j] === '\x03'
|
||||
|| (unicode.isSurrogate(line, j - 1) && line[j + 1] !== '\x03')
|
||||
|| unicode.combining[line[j]]) {
|
||||
|| unicode.isCombining(line, j)) {
|
||||
i = j + 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue