You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to display HTML from Markdown, but it never displays HTML it displays the raw Markdown text
My code:
<scriptlang="ts">importtype{ PageData }from'./$types';importSvelteMarkdownfrom'svelte-markdown'exportletdata: PageData;constsource=` # Hello World This is a paragraph `</script>
<svelte:head><title>Post: {data.post.title}</title></svelte:head><article><h1>{data.post.title}</h1><SvelteMarkdown{source}></SvelteMarkdown></article>
What it displays
The text was updated successfully, but these errors were encountered:
This is because of the indents in source. It actually does render the HTML, but it's wrapped in <code> tags because that's what it's parsed into (a code block).
I'm trying to display HTML from Markdown, but it never displays HTML it displays the raw Markdown text
My code:
What it displays
The text was updated successfully, but these errors were encountered: