From f528b5522642da5fd116bd2aa07254a91d0de492 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 21 Feb 2023 07:42:38 +1300 Subject: [PATCH] Move renderer assignment to options --- shared/naturalcrit/markdown.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index be360dccd..b209bf90d 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -10,7 +10,7 @@ renderer.html = function (html) { const openTag = html.substring(0, html.indexOf('>')+1); html = html.substring(html.indexOf('>')+1); html = html.substring(0, html.lastIndexOf('')); - return `${openTag} ${Marked.parse(html, { renderer: renderer })} `; + return `${openTag} ${Marked.parse(html)} `; } return html; }; @@ -239,7 +239,7 @@ const definitionLists = { Marked.use({ extensions: [mustacheSpans, mustacheDivs, mustacheInjectInline, definitionLists] }); Marked.use(MarkedExtendedTables()); Marked.use(mustacheInjectBlock); -Marked.use({ smartypants: true }); +Marked.use({ renderer: renderer, smartypants: true }); //Fix local links in the Preview iFrame to link inside the frame renderer.link = function (href, title, text) {