From 75b609fac5fe2f4f9a0d45ee0d1fce99b7117f6f Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Sat, 8 Feb 2025 13:51:03 +0100 Subject: [PATCH] Fix rare whitespace issue --- src/index.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 5a69c4b..1684384 100644 --- a/src/index.ts +++ b/src/index.ts @@ -107,7 +107,10 @@ ${this.formatPerson()} } class Range { - constructor(public date_start: Date, public date_end: Date) {} + constructor( + public date_start: Date, + public date_end: Date + ) {} } abstract class CSVParser { @@ -142,7 +145,12 @@ class mBankParser extends CSVParser { const transactions = []; for (let i = 38; i <= last - 5; i++) { const line = lines[i]; + if (line.length == 10 && line[9] == "") { + line.splice(9); + console.log(line); + } if (line.length != 9) { + console.log({ line }); throw new Error( "Wrong amount of columns! maybe a semicolon got stuck in a transaction description?" );