markdown-it-classy
markdown-it-classy copied to clipboard
Class is added to outer <p> and not inside <img>
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