From 8c89f373fa703b025a574cffb45db11a45fa7ee0 Mon Sep 17 00:00:00 2001 From: valadaptive Date: Sat, 2 Dec 2023 09:10:41 -0500 Subject: [PATCH] Enable no-irregular-whitespace lint A couple comments contained non-breaking spaces (I think), which I replaced with regular spaces. --- .eslintrc.js | 3 +-- server.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index b5d706119..d8877020b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -69,7 +69,6 @@ module.exports = { 'no-constant-condition': 'off', 'no-empty': 'off', 'no-unsafe-finally': 'off', - 'no-dupe-keys': 'off', - 'no-irregular-whitespace': 'off' + 'no-dupe-keys': 'off' } }; diff --git a/server.js b/server.js index 9ff08178e..750894bc0 100644 --- a/server.js +++ b/server.js @@ -1285,10 +1285,10 @@ async function charaWrite(img_url, data, target_img, response = undefined, mes = for (let tEXtChunk of tEXtChunks) { chunks.splice(chunks.indexOf(tEXtChunk), 1); } - // Add new chunks before the IEND chunk + // Add new chunks before the IEND chunk const base64EncodedData = Buffer.from(data, 'utf8').toString('base64'); chunks.splice(-1, 0, PNGtext.encode('chara', base64EncodedData)); - //chunks.splice(-1, 0, text.encode('lorem', 'ipsum')); + //chunks.splice(-1, 0, text.encode('lorem', 'ipsum')); writeFileAtomicSync(charactersPath + target_img + '.png', Buffer.from(encode(chunks))); if (response !== undefined) response.send(mes);