2023-09-24 12:24:28 +01:00
|
|
|
<script>
|
|
|
|
|
import { marked } from 'marked';
|
|
|
|
|
|
|
|
|
|
export let content = '';
|
|
|
|
|
export let className = '';
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<article class="preview prose prose-sm sm:prose {className}">
|
2023-09-26 23:29:50 +01:00
|
|
|
{#if $$slots.content}
|
|
|
|
|
<slot name="content" />
|
|
|
|
|
{:else}
|
|
|
|
|
{@html marked(content, { breaks: true, gfm: true })}
|
|
|
|
|
{/if}
|
2023-09-24 12:24:28 +01:00
|
|
|
</article>
|