Skip to content

Commit fa8ca8a

Browse files
committed
reporting: fix lineWrap() size check
Oops, a bug from 2fe8fa0 Fixes: #180 PR-URL: #181
1 parent 85e31a5 commit fa8ca8a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/report/module.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ function lineWrap (str, maxLength, split = ' ') {
213213
const lines = []
214214
let lineIdx = 0
215215
for (const word of words) {
216-
while ((lines[lineIdx] + word).length > maxLength) {
216+
while ((lines[lineIdx] + word).length >= maxLength) {
217217
lineIdx++
218218
}
219219
if (!lines[lineIdx]) lines[lineIdx] = lineIdx > 0 ? [''] : []

0 commit comments

Comments
 (0)