Update the toID method to collapse multiple whitespace characters to a single underscore

This commit is contained in:
Oliver-Akins 2025-07-13 19:14:47 -06:00
parent 8c39374038
commit 0fcf24bfcb

View file

@ -8,6 +8,6 @@
export function toID(text) { export function toID(text) {
return text return text
.toLowerCase() .toLowerCase()
.replace(/\s/g, `_`) .replace(/\s+/g, `_`)
.replace(/\W/g, ``); .replace(/\W/g, ``);
}; };