From 66c46c284647821fb0ba7d8a0f3416d71ab073df Mon Sep 17 00:00:00 2001 From: Gordon Pedersen Date: Fri, 24 May 2024 11:09:31 +1000 Subject: [PATCH] don't add tags if there are none... --- src/worker.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/worker.js b/src/worker.js index d7a4537..5058d05 100644 --- a/src/worker.js +++ b/src/worker.js @@ -136,6 +136,7 @@ async function handleLol(body, env) { // weblog has some quirks with its yaml interpretation frontmatterString = frontmatterString .replace(/{\n/, '').replace(/}\n/, '').replace(/^\s\s/gm, '').replace(/,$/gm, '') + .replace(/\ntags: \[\]$/m, '') .replace(/^tags: \[ (.*) \]$/m, "tags: $1") .replace(/^title: "(.*)"$/m, "title: $1")