From fe39b9cc23663c1c0873e90f8fe08b6e61c00abc Mon Sep 17 00:00:00 2001 From: Sander Declerck Date: Wed, 6 Aug 2025 15:28:39 +0200 Subject: [PATCH] Also split on unicode line and paragraph separators --- src/shell-integration/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell-integration/helpers.js b/src/shell-integration/helpers.js index 485035e..7efface 100644 --- a/src/shell-integration/helpers.js +++ b/src/shell-integration/helpers.js @@ -28,7 +28,7 @@ export function removeLinesMatchingPattern(filePath, pattern) { } const fileContent = fs.readFileSync(filePath, "utf-8"); - const lines = fileContent.split(/[\r\n]+/); + const lines = fileContent.split(/[\r\n\u2028\u2029]+/); const updatedLines = lines.filter((line) => !shouldRemoveLine(line, pattern)); fs.writeFileSync(filePath, updatedLines.join(os.EOL), "utf-8"); }