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 <bdashore3@proton.me>
This commit is contained in:
kingbri
2023-06-22 17:58:57 -04:00
parent 1672824416
commit fa9df8f22e

View File

@@ -20,6 +20,6 @@ export const dinkusExtension = () => {
return [{ return [{
type: "lang", type: "lang",
regex: replaceRegex, regex: replaceRegex,
replace: (match) => match.replace(replaceRegex, `<div>${savedDinkus}</div>`).trim() replace: (match) => match.replace(replaceRegex, `\u0000${savedDinkus} \n`)
}]; }];
} }