fix menu alignment

This commit is contained in:
jfmonty2 committed 2021-10-20 21:26:48 -07:00
1 parent 23eb4341b6
commit cb04687d0b
2 files changed
+13 -3

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
// this approach won't work if an attribute value contains ">"
const tag = /<[^>]*?>/g
const nonAlphaNum = /[^A-Za-z0-9\-]/g
const space = /\s/g
export default function slugify(text) {
return text.replace(tag, '')
.replace(space, '-')
.replace(nonAlphNum, '')
}