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
Hi, need assistance on how to get the markdown working in Svelte via the <slot/> tag. As you can see from the image bellow, markdown is not parsed inside of the Note component.
The Note component uses slots in order to pass the text into the component,
// +test.md
<script>
importNotefrom"$lib/components/callouts/Note.svelte"
</script>
> This is a note for **comparison** $meow$
<Note>
Fugiat $a$ dolore **labore** ad est dolore non ea id ad tempor in. Cupidatat esse ad aliquip fugiat sit nisi consequat incididunt non ea elit. In amet exercitation excepteur ut laborum est ullamco. Minim anim ipsum cillum occaecat fugiat minim esse labore aliqua pariatur do irure. Eu eu esse aute veniam est est ex mollit.
</Note>
The text was updated successfully, but these errors were encountered:
I'm no markdown expert, but my understanding is that markdown isn't parsed in HTML blocks. The following markdown code:
<h1>
`code`
</h1>
Will be compiled to:
<h1>`code`</h1>
So, there's nothing special about you passing slot content in your example; when markdown sees an HTML block, it doesn't parse markdown within that block. But you can separate the HTML blocks like this:
Hi, need assistance on how to get the markdown working in Svelte via the
<slot/>
tag. As you can see from the image bellow, markdown is not parsed inside of the Note component.The Note component uses slots in order to pass the text into the component,
The text was updated successfully, but these errors were encountered: