refac: latex

This commit is contained in:
Timothy J. Baek
2024-08-14 16:07:39 +02:00
parent 0ec1f9e331
commit 6aefc79807
3 changed files with 120 additions and 70 deletions

View File

@@ -37,10 +37,7 @@
</del>
{:else if token.type === 'inlineKatex'}
{#if token.text}
<KatexRenderer
content={revertSanitizedResponseContent(token.text)}
displayMode={token?.displayMode ?? false}
/>
<KatexRenderer content={revertSanitizedResponseContent(token.text)} displayMode={false} />
{/if}
{:else if token.type === 'text'}
{token.raw}

View File

@@ -116,6 +116,13 @@
displayMode={token?.displayMode ?? false}
/>
{/if}
{:else if token.type === 'blockKatex'}
{#if token.text}
<KatexRenderer
content={revertSanitizedResponseContent(token.text)}
displayMode={token?.displayMode ?? false}
/>
{/if}
{:else if token.type === 'space'}
{''}
{:else}