From 9bb22cad44ef6a0a055823d77426a72d6f2a8d35 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 19 Dec 2024 12:11:32 -0400 Subject: content: transformContent: harden for links within templates --- src/content/dependencies/transformContent.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/content/dependencies') diff --git a/src/content/dependencies/transformContent.js b/src/content/dependencies/transformContent.js index 6f1ad0c7..3d9fdd60 100644 --- a/src/content/dependencies/transformContent.js +++ b/src/content/dependencies/transformContent.js @@ -368,7 +368,15 @@ export default { return {type: 'text', data: nodeFromRelations.data}; } - const {link, label, hash} = nodeFromRelations; + // TODO: This is a bit hacky, like the stuff below, + // but since we dressed it up in a utility function + // maybe it's okay... + const link = + html.resolve( + nodeFromRelations.link, + {slots: ['content', 'hash']}); + + const {label, hash} = nodeFromRelations; // These are removed from the typical combined slots({})-style // because we don't want to override slots that were already set -- cgit 1.3.0-6-gf8a5