From c89abf56acfb9877788859194d982b3874716a7c Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Fri, 22 Nov 2024 14:02:01 +0100 Subject: [PATCH] :bug: Fix translate files generations with markdown and links --- frontend/scripts/_helpers.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/frontend/scripts/_helpers.js b/frontend/scripts/_helpers.js index 95dce0ac3..c7671a361 100644 --- a/frontend/scripts/_helpers.js +++ b/frontend/scripts/_helpers.js @@ -237,13 +237,18 @@ async function renderTemplate(path, context = {}, partials = {}) { return mustache.render(content, context, partials); } -const renderer = { - link(href, title, text) { - return `${text}`; +const extension = { + useNewRenderer: true, + renderer: { + link(token) { + const href = token.href; + const text = token.text; + return `${text}`; + }, }, }; -marked.use({ renderer }); +marked.use(extension); async function readTranslations() { const langs = [