From e4bd0977da3621a8d3f82cab949a6734b169b71e Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Wed, 21 Jun 2023 16:47:34 +0000 Subject: Exception updation & minor polishing (but it's still WIP) --- parseExceptions.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'parseExceptions.js') diff --git a/parseExceptions.js b/parseExceptions.js index 63cd6d2..42a1c50 100644 --- a/parseExceptions.js +++ b/parseExceptions.js @@ -50,9 +50,10 @@ assert.deepEqual( async function updateExceptions(exceptions, DB) { await DB.query_raw('DELETE FROM exceptions'); let dbOperations = []; - for (line of exceptions.split('\n')) { - if (line === '' || line[0] === '#') - continue + for (let line of exceptions.split('\n')) { + if ((line === '') || (line === '\r') || (line[0] === '#')) { + continue; + } const [start, end, header, message] = parseLine(line); dbOperations.push(DB.execute( 'INSERT INTO exceptions VALUE (?, ?, ?, ?)', -- cgit v1.2.3