|
|
@ -14,8 +14,10 @@
|
|
|
|
import TableRow from "../atoms/TableRow.svelte";
|
|
|
|
import TableRow from "../atoms/TableRow.svelte";
|
|
|
|
import TableCell from "../atoms/TableCell.svelte";
|
|
|
|
import TableCell from "../atoms/TableCell.svelte";
|
|
|
|
import Image from "../atoms/Image.svelte";
|
|
|
|
import Image from "../atoms/Image.svelte";
|
|
|
|
import { markedEmoji } from "marked-emoji";
|
|
|
|
|
|
|
|
import emojis from "$lib/emojis";
|
|
|
|
import emojis from "$lib/emojis";
|
|
|
|
|
|
|
|
import { smartypants } from "$lib/utils";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { markedEmoji } from "marked-emoji";
|
|
|
|
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
type Props = {
|
|
|
|
markdown: string;
|
|
|
|
markdown: string;
|
|
|
@ -24,6 +26,7 @@
|
|
|
|
const { markdown }: Props = $props();
|
|
|
|
const { markdown }: Props = $props();
|
|
|
|
|
|
|
|
|
|
|
|
marked.use(markedEmoji({ emojis }));
|
|
|
|
marked.use(markedEmoji({ emojis }));
|
|
|
|
|
|
|
|
|
|
|
|
const markdownTokens = marked.lexer(markdown);
|
|
|
|
const markdownTokens = marked.lexer(markdown);
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
@ -93,7 +96,7 @@
|
|
|
|
{@render markdownToken(childToken)}
|
|
|
|
{@render markdownToken(childToken)}
|
|
|
|
{/each}
|
|
|
|
{/each}
|
|
|
|
{:else if token.text}
|
|
|
|
{:else if token.text}
|
|
|
|
{token.text}
|
|
|
|
{@html smartypants(token.text)}
|
|
|
|
{:else}{@html "<!-- This token does not hold value -->"}{/if}
|
|
|
|
{:else}{@html "<!-- This token does not hold value -->"}{/if}
|
|
|
|
{/snippet}
|
|
|
|
{/snippet}
|
|
|
|
|
|
|
|
|
|
|
|