JuliaPluto / PlutoUI.jl

https://featured.plutojl.org/basic/plutoui.jl
The Unlicense
299 stars 54 forks source link

Image starting an item #281

Open blegat opened 5 months ago

blegat commented 5 months ago

I'm unsure if it's a bug in PlutoUI or the Markdown stdlib but here it is: When entering the following in a Pluto cell, we get the logo and the text on the same line:

md"""
* ![logo](https://julialang.org/assets/infra/logo.svg) Julia
"""

but with the Resource, they are split on different lines which is a bug IMO

md"""
* $(Resource("https://julialang.org/assets/infra/logo.svg")) Julia
"""

By adding anything before the image (including a space), it fixes the issue

md"""
*  $(Resource("https://julialang.org/assets/infra/logo.svg")) Julia
"""

Looking at the html, I have respectively For the first one

<ul>
<li><p><img src="https://julialang.org/assets/infra/logo.svg" alt="logo" /> Julia</p>
</li>
</ul>

Second one

<ul>
<li><img controls='' src='https://julialang.org/assets/infra/logo.svg' type='image/svg+xml'></img>
<p>Julia</p>
</li>
</ul>

Third one

<ul>
<li><p><img controls='' src='https://julialang.org/assets/infra/logo.svg' type='image/svg+xml'></img> Julia</p>
</li>
</ul>

The issue in the second one is the misplaced <p>.