don't add tags if there are none...

This commit is contained in:
Gordon Pedersen 2024-05-24 11:09:31 +10:00
parent 16193a2e7e
commit 66c46c2846

View file

@ -136,6 +136,7 @@ async function handleLol(body, env) {
// weblog has some quirks with its yaml interpretation // weblog has some quirks with its yaml interpretation
frontmatterString = frontmatterString frontmatterString = frontmatterString
.replace(/{\n/, '').replace(/}\n/, '').replace(/^\s\s/gm, '').replace(/,$/gm, '') .replace(/{\n/, '').replace(/}\n/, '').replace(/^\s\s/gm, '').replace(/,$/gm, '')
.replace(/\ntags: \[\]$/m, '')
.replace(/^tags: \[ (.*) \]$/m, "tags: $1") .replace(/^tags: \[ (.*) \]$/m, "tags: $1")
.replace(/^title: "(.*)"$/m, "title: $1") .replace(/^title: "(.*)"$/m, "title: $1")