From fa9df8f22ebb12453c71c0d3d139aab6e87f77f4 Mon Sep 17 00:00:00 2001 From: kingbri Date: Thu, 22 Jun 2023 17:58:57 -0400 Subject: [PATCH] Markdown: Fix dinkus formatter with codefences Change how the formatter is applied to use an invisible null unicode character instead of div tags and add a newline to preserve the DOM tree so codeblocks and child elements aren't altered. Signed-off-by: kingbri --- public/scripts/showdown-dinkus.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/showdown-dinkus.js b/public/scripts/showdown-dinkus.js index 824a406bc..9a895ee9d 100644 --- a/public/scripts/showdown-dinkus.js +++ b/public/scripts/showdown-dinkus.js @@ -20,6 +20,6 @@ export const dinkusExtension = () => { return [{ type: "lang", regex: replaceRegex, - replace: (match) => match.replace(replaceRegex, `
${savedDinkus}
`).trim() + replace: (match) => match.replace(replaceRegex, `\u0000${savedDinkus} \n`) }]; }