mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
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:
@@ -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`)
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user