Default KaTeX Rendering

This commit is contained in:
2024-04-30 21:50:55 +09:00
parent 0066760f86
commit 68a58569ba

View File

@@ -250,19 +250,6 @@
return '`rendermath' + math.trim() + '`' return '`rendermath' + math.trim() + '`'
}) })
// .replace(/\\\[((?:\s|\S)*?)\\\]/g, (match, math) => {
// return '\n```rendermath\n' + math.trim() + '\n```\n'
// })
// .replace(/\$\$((?:\s|\S)*?)\$\$/g, (match, math) => {
// return '\n```rendermath\n' + math.trim() + '\n```\n'
// })
// .replace(/\\\((?!\$)(.*?[^\\])\\\)/g, (match, math) => {
// return '`rendermath' + math.trim() + '`'
// })
// .replace(/(?<!\\|\$)\$(?!\$)(.*?[^\\])\$(?!\$)/g, (match, math) => {
// return '`rendermath' + math.trim() + '`'
// })
text = text.replace(new RegExp(`${codeBlockPlaceholderPrefix}idx(\\d+)__`, 'g'), (match, p1) => { text = text.replace(new RegExp(`${codeBlockPlaceholderPrefix}idx(\\d+)__`, 'g'), (match, p1) => {
return codeBlocks[p1] return codeBlocks[p1]
}) })
@@ -313,7 +300,7 @@
{/if} {/if}
{#key refreshCounter} {#key refreshCounter}
<SvelteMarkdown <SvelteMarkdown
bind:source={displayMessage} source={preprocessMath(displayMessage)}
options={markdownOptions} options={markdownOptions}
renderers={renderers} renderers={renderers}
/> />