readline: improve getStringWidth()
1. Simplify the getStringWidth function used by Intl builds by removing dead code (the options were unused) and by refactoring the logic. 2. Improve the getStringWidth unicode handling used by non-Intl builds. The getStringWidth function returned the wrong width for multiple inputs. It's now improved by supporting various zero width characters and more full width characters. PR-URL: https://github.com/nodejs/node/pull/31112 Reviewed-By:Michaël Zasso <targos@protonmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
parent
b52bf605
Please register or sign in to comment