From c1a2e63ba92e87002e5afaece21d5b11b07fd4f4 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 8 Aug 2023 21:15:46 -0300 Subject: content: transformContent: fix [[date]] not working The implementation was basically all there, but replacerKey and replacerValue weren't being extracted from the tag node properly. --- src/content/dependencies/transformContent.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/content/dependencies/transformContent.js b/src/content/dependencies/transformContent.js index 625b137..ba66a02 100644 --- a/src/content/dependencies/transformContent.js +++ b/src/content/dependencies/transformContent.js @@ -236,8 +236,16 @@ export default { } // This will be another {type: 'tag'} node which gets processed in - // generate. - return node; + // generate. Extract replacerKey and replacerValue now, since it'd + // be a pain to deal with later. + return { + ...node, + data: { + ...node.data, + replacerKey: node.data.replacerKey.data, + replacerValue: node.data.replacerValue[0].data, + }, + }; }), }; }, -- cgit 1.3.0-6-gf8a5