Closed step- closed 5 months ago
I think this is duplicate of #210.
Now it passes my test suite. I think the reason we aren't seeing this problem after #210 is that now r->image_nesting_level
is 1 for the outer image, and 0 when outside any image, so https://github.com/mity/md4c/blob/ca169a9/src/md4c-html.c#L504 doesn't output a hard-break anymore (see also L508 for soft break).
This case involves hard breaks within the text of nested images.
Test subject:
(two spaces after lines 1, 2 and 3)
cmark:
Above we see that cmark conflates all text into the alt attribute. This is the recommended way of handling nested images for HTML (as you commented in your source code).
On the other hand something goes the wrong way in md2html, which lets the text in line 4 spill over to the containing
<p>
element.mdview: