markdown-it-classy icon indicating copy to clipboard operation
markdown-it-classy copied to clipboard

Class is added to outer <p> and not inside <img>

Open pixelastic opened this issue 6 years ago • 0 comments

Hello,

The following code:


![Alternative text][1] {my-class}

[1]: http://www.example.com/image.jpg

Gives:

<p class="my-class">
  <img src="http://www.example.com/image.jpg" alt="Alternative text"/>
</p>

While it should give:

<p>
  <img src="http://www.example.com/image.jpg" alt="Alternative text"  class="my-class" />
</p>

Unless I am missing something? I tried by putting the class on the same line and on the next as well, but always getting the same result of it being applied to the wrapping <p>.

Thanks for your time in looking into this

pixelastic avatar Oct 04 '18 11:10 pixelastic