Commit 9ced334
committed
util: refactor inspecting long lines
Using the `util.inspect` `compact` mode set to something else than
`true` resulted in breaking long lines in case the line would exceed
the `breakLength` option and if it contained whitespace and or new
lines.
It turned out that this behavior was less useful than originally
expected and it is now changed to only break on line breaks if the
`breakLength` option is exceeded for the inspected string. This should
be align better with the user expectation than the former behavior.
PR-URL: #28055
Fixes: #27690
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>1 parent 56b150b commit 9ced334
File tree
2 files changed
+22
-79
lines changed- lib/internal/util
- test/parallel
2 files changed
+22
-79
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | | - | |
132 | 130 | | |
133 | 131 | | |
134 | 132 | | |
| |||
1055 | 1053 | | |
1056 | 1054 | | |
1057 | 1055 | | |
1058 | | - | |
1059 | | - | |
1060 | | - | |
1061 | | - | |
1062 | | - | |
1063 | | - | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
1067 | | - | |
1068 | | - | |
1069 | | - | |
1070 | | - | |
1071 | | - | |
1072 | | - | |
1073 | | - | |
1074 | | - | |
1075 | | - | |
1076 | | - | |
1077 | | - | |
1078 | | - | |
1079 | | - | |
1080 | | - | |
1081 | | - | |
1082 | | - | |
1083 | | - | |
1084 | | - | |
1085 | | - | |
1086 | | - | |
1087 | | - | |
1088 | | - | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
1089 | 1062 | | |
1090 | 1063 | | |
1091 | 1064 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
1487 | 1487 | | |
1488 | 1488 | | |
1489 | 1489 | | |
1490 | | - | |
1491 | | - | |
1492 | | - | |
1493 | | - | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
1494 | 1493 | | |
1495 | 1494 | | |
1496 | 1495 | | |
| |||
1507 | 1506 | | |
1508 | 1507 | | |
1509 | 1508 | | |
1510 | | - | |
1511 | | - | |
1512 | | - | |
1513 | | - | |
1514 | | - | |
1515 | | - | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
1516 | 1512 | | |
1517 | 1513 | | |
1518 | 1514 | | |
| |||
1526 | 1522 | | |
1527 | 1523 | | |
1528 | 1524 | | |
1529 | | - | |
1530 | | - | |
1531 | | - | |
1532 | | - | |
1533 | | - | |
1534 | | - | |
1535 | | - | |
1536 | | - | |
1537 | | - | |
1538 | | - | |
1539 | | - | |
1540 | | - | |
1541 | | - | |
1542 | | - | |
1543 | | - | |
1544 | | - | |
1545 | | - | |
1546 | | - | |
1547 | | - | |
1548 | | - | |
1549 | | - | |
1550 | | - | |
1551 | | - | |
1552 | | - | |
| 1525 | + | |
1553 | 1526 | | |
1554 | 1527 | | |
1555 | 1528 | | |
| |||
1588 | 1561 | | |
1589 | 1562 | | |
1590 | 1563 | | |
1591 | | - | |
| 1564 | + | |
1592 | 1565 | | |
1593 | 1566 | | |
1594 | 1567 | | |
| |||
2192 | 2165 | | |
2193 | 2166 | | |
2194 | 2167 | | |
2195 | | - | |
2196 | | - | |
2197 | | - | |
2198 | | - | |
2199 | | - | |
2200 | | - | |
2201 | | - | |
2202 | | - | |
2203 | | - | |
2204 | | - | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
2205 | 2175 | | |
2206 | 2176 | | |
2207 | 2177 | | |
| |||
0 commit comments