fix: duplicate whitespace in tag map output

This commit is contained in:
Cory Dransfeldt 2024-02-26 12:48:23 -08:00
parent b90c85d369
commit 69a3c00fb5
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -22,7 +22,7 @@ export const tagMap = (collection) => {
const tagString = [...new Set(post.data.tags.map((tag) => tagAliases[tag.toLowerCase()]))]
.join(' ')
.trim()
if (tagString) tags[url] = tagString
if (tagString) tags[url] = tagString.replace(/\s+/g,' ')
})
}
if (item.data.links) {
@ -31,7 +31,7 @@ export const tagMap = (collection) => {
.map((tag) => tagAliases[tag.toLowerCase()])
.join(' ')
.trim()
if (tagString) tags[link.url] = tagString
if (tagString) tags[link.url] = tagString.replace(/\s+/g,' ')
})
}
})