Commit 6877139
util: fix stylize of special properties in inspect
Previously, formatExtraProperties applied ctx.stylize to the entire
'[key]: value' string. This caused the colon and space to be styled,
making the output inconsistent with normal object properties.
Now, only the key itself is stylized, and the colon and space remain
unstyled, aligning with the formatting of regular properties.
Refs: #60131
PR-URL: #60479
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>1 parent edc3033 commit 6877139
File tree
2 files changed
+16
-1
lines changed- lib/internal/util
- test/parallel
2 files changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2520 | 2520 | | |
2521 | 2521 | | |
2522 | 2522 | | |
2523 | | - | |
| 2523 | + | |
| 2524 | + | |
2524 | 2525 | | |
2525 | 2526 | | |
2526 | 2527 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2391 | 2391 | | |
2392 | 2392 | | |
2393 | 2393 | | |
| 2394 | + | |
| 2395 | + | |
| 2396 | + | |
| 2397 | + | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
| 2402 | + | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
2394 | 2408 | | |
2395 | 2409 | | |
2396 | 2410 | | |
| |||
0 commit comments