ow / src /lib /components /chat /Messages /Markdown /KatexRenderer.svelte
github-actions[bot]
GitHub deploy: 2e9fe55e78d510af1fc7bc06a0c7edb71274013d
b9b8d18
raw
history blame contribute delete
274 Bytes
<script lang="ts">
import katex from 'katex';
import 'katex/contrib/mhchem';
import 'katex/dist/katex.min.css';
export let content: string;
export let displayMode: boolean = false;
</script>
{@html katex.renderToString(content, { displayMode, throwOnError: false })}