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() + '`'
})
// .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) => {
return codeBlocks[p1]
})
@@ -313,8 +300,8 @@
{/if}
{#key refreshCounter}
<SvelteMarkdown
bind:source={displayMessage}
options={markdownOptions}
source={preprocessMath(displayMessage)}
options={markdownOptions}
renderers={renderers}
/>
{/key}