handle trailing whitespace on lines

This commit is contained in:
mikejeffers
2023-05-20 16:04:58 -04:00
parent 9e6168111f
commit 496585b543

View File

@@ -129,7 +129,7 @@ function createFormattedText(width, g, structuredText, addBackground = false) {
if (lastSpaceIndex > -1) { if (lastSpaceIndex > -1) {
i = prevIndex + lastSpaceIndex + 1; i = prevIndex + lastSpaceIndex + 1;
} }
linesUnderWidth.push(fullStr.slice(prevIndex, i)); linesUnderWidth.push(fullStr.slice(prevIndex, i).trim());
prevIndex = i; prevIndex = i;
tempStr = null; tempStr = null;
} }