fix: adjust line splitting condition, suggested by @JoePlant
This commit is contained in:
parent
1f8c59cad9
commit
0b0706dad2
1 changed files with 1 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ export const splitlines = (input, maxCharLength) => {
|
||||||
|
|
||||||
let lastOne = acc[acc.length - 1];
|
let lastOne = acc[acc.length - 1];
|
||||||
|
|
||||||
if (lastOne.length + cur.length > maxCharLength) {
|
if (lastOne.length + cur.length >= maxCharLength) {
|
||||||
return [...acc, cur];
|
return [...acc, cur];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue