Commit f4b5b704 authored by Timothy Gu's avatar Timothy Gu Committed by James M Snell
Browse files

src: revise character width calculation

- Categorize all nonspacing marks (Mn) and enclosing marks (Me) as
  0-width
- Categorize all spacing marks (Mc) as non-0-width.
- Treat soft hyphens (a format character Cf) as non-0-width.
- Do not treat all unassigned code points as 0-width; instead, let ICU
  select the default for that character per UAX #11.
- Avoid getting the General_Category of a character multiple times as it
  is an intensive operation.

Refs: http://unicode.org/reports/tr11/
PR-URL: https://github.com/nodejs/node/pull/13918


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 01aeb388
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment