Bug correction in handlize regex

This commit is contained in:
ybouane 2024-10-12 23:27:12 -04:00
parent acb30c0737
commit 89d3eaee1a

View file

@ -13,7 +13,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+/g, '-');
const handlize = s=>s.toLowerCase().replace(/[^a-z0-9]/g, ' ').trim().replace(/\s+/g, '-');
const checkContent = async (content, criterion, negate) => {
if(typeof criterion=='string') {
return content.includes(criterion)!=negate;