pablo-abc / svelte-markdown

Markdown parser to svelte components
MIT License
358 stars 50 forks source link

Double rendering of nested images #91

Open juliuskreutz opened 7 months ago

juliuskreutz commented 7 months ago

This simple code

<script>
    import SvelteMarkdown from 'svelte-markdown';

    const source = `<div>

![](https://cataas.com/cat)

</div>`;
</script>

<SvelteMarkdown {source} />

renders wrong.

expected (from Marked Demo):

<div>
    <p><img src="https://cataas.com/cat" alt=""></p>
</div>

actual:

<div>
    <p><img src="https://cataas.com/cat" alt=""></p>
</div>

<p><img src="https://cataas.com/cat" alt=""></p>