From 1d799477fbdf6ea49531dc2f718ef0e562ec203f Mon Sep 17 00:00:00 2001 From: ybouane Date: Fri, 11 Oct 2024 11:20:37 -0400 Subject: [PATCH] Bug correction in handlize function. --- watcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/watcher.js b/watcher.js index 00a858e..3700f4f 100644 --- a/watcher.js +++ b/watcher.js @@ -14,7 +14,7 @@ watchFile('./config.js', async ()=>{ // Dynamically reload config and watch it f const statusFile = './static/status.json'; const delay = async t=>new Promise(r=>setTimeout(r, t)); -const handlize = s=>s.toLowerCase().replace(/[^a-z0-9]/, ' ').trim().replace(/\s{2,}/g, '-'); +const handlize = s=>s.toLowerCase().replace(/[^a-z0-9]/, ' ').trim().replace(/\s+/g, '-'); const checkContent = async (content, criterion, negate) => { if(typeof criterion=='string') { return content.includes(criterion)!=negate;