diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2020-05-30 06:56:48 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2020-06-25 16:42:38 +0300 |
commit | 3646872f606949cb21ff95aa6d5a0c9ba0418e59 (patch) | |
tree | 3b198b9ed33f33d46742ba735025ca8b6c703b0f /lib/internal/util | |
parent | 66679ce3348fca62a600bbeefa7b7c919344aaad (diff) |
util: fix width detection for DEL without ICU
This makes sure the DEL character (ASCII 127) is detected as a zero
width character even if Node.js is not built with ICU.
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: https://github.com/nodejs/node/pull/33650
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'lib/internal/util')
-rw-r--r-- | lib/internal/util/inspect.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/internal/util/inspect.js b/lib/internal/util/inspect.js index 0d9c0221113..8cab2079367 100644 --- a/lib/internal/util/inspect.js +++ b/lib/internal/util/inspect.js @@ -2089,7 +2089,7 @@ if (internalBinding('config').hasIntl) { const isZeroWidthCodePoint = (code) => { return code <= 0x1F || // C0 control codes - (code > 0x7F && code <= 0x9F) || // C1 control codes + (code >= 0x7F && code <= 0x9F) || // C1 control codes (code >= 0x300 && code <= 0x36F) || // Combining Diacritical Marks (code >= 0x200B && code <= 0x200F) || // Modifying Invisible Characters // Combining Diacritical Marks for Symbols |