misc: add markdown to body preview

This commit is contained in:
Xyphyn committed 2023-07-29 12:40:06 -07:00
1 parent 17316b8cdf
commit ba6fc8cbeb
4 files changed
+19 -6

No files matched your search

+7 -2
View File
@@ -1,11 +1,16 @@
<script lang="ts">
import { md } from '$lib/components/markdown/markdown'
import { md, mdInline } from '$lib/components/markdown/markdown'
export let source: string = ''
export let inline: boolean = false
</script>
<div class="break-words flex flex-col markdown gap-2 leading-[1.5]">
{@html md.render(source)}
{#if inline}
{@html mdInline.render(source)}
{:else}
{@html md.render(source)}
{/if}
</div>
<style lang="postcss">