feat(markdown): Migrate to comark for markdown rendering

This commit is contained in:
Zoe
2026-08-11 03:18:28 -05:00
parent c9e48687ef
commit 4b99921023
10 changed files with 441 additions and 337 deletions
+15
View File
@@ -0,0 +1,15 @@
<script setup lang="ts">
import { renderMath } from 'comark/plugins/math';
const props = defineProps<{
content: string;
display: boolean;
}>();
const html = computed(() => renderMath(props.content, props.display, { throwOnError: false }));
</script>
<template>
<span v-if="!display" class="math-inline" v-html="html"></span>
<div v-else class="math-block" v-html="html"></div>
</template>