| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 04ceeaf commit 02ae3f5
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2050,6 +2050,8 @@ if (internalBinding('config').hasIntl) { | |||
| 2050 | 2050 | (code > 0x7F && code <= 0x9F) || // C1 control codes | |
| 2051 | 2051 | (code >= 0x300 && code <= 0x36F) || // Combining Diacritical Marks | |
| 2052 | 2052 | (code >= 0x200B && code <= 0x200F) || // Modifying Invisible Characters | |
| 2053 | + // Combining Diacritical Marks for Symbols | ||
| 2054 | + (code >= 0x20D0 && code <= 0x20FF) || | ||
| 2053 | 2055 | (code >= 0xFE00 && code <= 0xFE0F) || // Variation Selectors | |
| 2054 | 2056 | (code >= 0xFE20 && code <= 0xFE2F) || // Combining Half Marks | |
| 2055 | 2057 | (code >= 0xE0100 && code <= 0xE01EF); // Variation Selectors | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,6 @@ | |||
| 1 | 1 | // Flags: --expose-internals | |
| 2 | 2 | 'use strict'; | |
| 3 | 3 | const common = require('../common'); | |
| 4 | - const { internalBinding } = require('internal/test/binding'); | ||
| 5 | 4 | const { PassThrough } = require('stream'); | |
| 6 | 5 | const readline = require('readline'); | |
| 7 | 6 | const assert = require('assert'); | |
@@ -21,22 +20,14 @@ common.skipIfDumbTerminal(); | |||
| 21 | 20 | const tests = [ | |
| 22 | 21 | [1, 'a'], | |
| 23 | 22 | [2, 'ab'], | |
| 24 | - [2, '丁'] | ||
| 23 | + [2, '丁'], | ||
| 24 | + [0, '\u0301'], // COMBINING ACUTE ACCENT | ||
| 25 | + [1, 'a\u0301'], // á | ||
| 26 | + [0, '\u20DD'], // COMBINING ENCLOSING CIRCLE | ||
| 27 | + [2, 'a\u20DDb'], // a⃝b | ||
| 28 | + [0, '\u200E'], // LEFT-TO-RIGHT MARK | ||
| 25 | 29 | ]; | |
| 26 | 30 | ||
| 27 | - // The non-ICU JS implementation of character width calculation is only aware | ||
| 28 | - // of the wide/narrow distinction. Only test these more advanced cases when | ||
| 29 | - // ICU is available. | ||
| 30 | - if (internalBinding('config').hasIntl) { | ||
| 31 | - tests.push( | ||
| 32 | - [0, '\u0301'], // COMBINING ACUTE ACCENT | ||
| 33 | - [1, 'a\u0301'], // á | ||
| 34 | - [0, '\u20DD'], // COMBINING ENCLOSING CIRCLE | ||
| 35 | - [2, 'a\u20DDb'], // a⃝b | ||
| 36 | - [0, '\u200E'] // LEFT-TO-RIGHT MARK | ||
| 37 | - ); | ||
| 38 | - } | ||
| 39 | - | ||
| 40 | 31 | for (const [cursor, string] of tests) { | |
| 41 | 32 | rl.write(string); | |
| 42 | 33 | assert.strictEqual(rl.getCursorPos().cols, cursor); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments