From 88f916a03e18dfb2e1c8ee65f8c5d1cbfe09f253 Mon Sep 17 00:00:00 2001 From: Kara Brightwell Date: Mon, 22 Apr 2024 18:17:38 +0100 Subject: [PATCH] don't trim wrapped lines --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 3fcb58d..d3235c0 100644 --- a/index.js +++ b/index.js @@ -141,7 +141,7 @@ const makeContentText = (text, {padding, width, textAlignment, height}) => { if (textWidth > max) { const newLines = []; for (const line of lines) { - const createdLines = wrapAnsi(line, max, {hard: true}); + const createdLines = wrapAnsi(line, max, {hard: true, trim: false}); const alignedLines = ansiAlign(createdLines, {align: textAlignment}); const alignedLinesArray = alignedLines.split('\n'); const longestLength = Math.max(...alignedLinesArray.map(s => stringWidth(s)));