Conversation
81735c6 to
02515e8
Compare
This comment has been minimized.
This comment has been minimized.
02515e8 to
80fe23b
Compare
This comment has been minimized.
This comment has been minimized.
da70f98 to
fc7f090
Compare
|
I'm not sure who to ping for a review. @srl295 maybe? |
srl295
left a comment
There was a problem hiding this comment.
LGTM. Could optimize the existing code, but generally LGTM.
lib/internal/util/inspect.js
Outdated
There was a problem hiding this comment.
So this might be doable as a regex… it could be compiled as a regex, i don't think there's an East Asian Width property available in regex.
There was a problem hiding this comment.
This could definitely be a regular expression. I guess it's slower that way but I did not check. I'll have a look soon.
There was a problem hiding this comment.
ICU4C also has API to get the East Asian Width.
There was a problem hiding this comment.
Yes, we use that in case Node.js is build with ICU but this is the fallback code.
The array grouping function relies on the width of the characters. It was not calculated correct so far, since it used the string length instead. This improves the unicode output by calculating the mono-spaced font width (other fonts might differ).
fc7f090 to
1b9547f
Compare
|
Relevant test failures in the no-intl host on CI? |
The array grouping function relies on the width of the characters. It was not calculated correct so far, since it used the string length instead. This improves the unicode output by calculating the mono-spaced font width (other fonts might differ). PR-URL: #31319 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
|
Landed in 8fb5fe2 🎉 |
The array grouping function relies on the width of the characters. It was not calculated correct so far, since it used the string length instead. This improves the unicode output by calculating the mono-spaced font width (other fonts might differ). PR-URL: #31319 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
|
@BridgeAR if this should go back to |
The array grouping function relies on the width of the characters. It was not calculated correct so far, since it used the string length instead. This improves the unicode output by calculating the mono-spaced font width (other fonts might differ). PR-URL: nodejs#31319 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
The array grouping function relies on the width of the characters. It was not calculated correct so far, since it used the string length instead. This improves the unicode output by calculating the mono-spaced font width (other fonts might differ). PR-URL: #31319 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
The array grouping function relies on the width of the characters.
It was not calculated correct so far, since it used the string
length instead.
This improves the unicode output by calculating the mono-spaced
font width (other fonts might differ).
I had to move some functions. Otherwise we'd have to load the utils functions by default and that did not seem necessary.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes