diff options
author | Joel Kronqvist <joelkronqvist@proton.me> | 2023-06-21 16:47:34 +0000 |
---|---|---|
committer | Joel Kronqvist <joelkronqvist@proton.me> | 2023-06-21 16:47:34 +0000 |
commit | e4bd0977da3621a8d3f82cab949a6734b169b71e (patch) | |
tree | 92f8079047b5d6bc951cb1eee02c3d2ceca339f3 /parseExceptions.js | |
parent | c6eb85c138c267db08103de28a3a7c6dffee6c4f (diff) | |
download | LYLLRuoka-e4bd0977da3621a8d3f82cab949a6734b169b71e.tar.gz LYLLRuoka-e4bd0977da3621a8d3f82cab949a6734b169b71e.zip |
Exception updation & minor polishing (but it's still WIP)
Diffstat (limited to 'parseExceptions.js')
-rw-r--r-- | parseExceptions.js | 7 |
1 files changed, 4 insertions, 3 deletions
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 (?, ?, ?, ?)', |