-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
Description
#28 through #57 added support and tests for side by side links. However, it did not add a test for side by side link with images as links as are commonly used by badges in GitHub READMEs.
This sample:
[![Crate][crate_img]][crate]
[![Second][second_img]][second]
[crate]: crate_url "Link"
[crate_img]: crate_image_url "Image"
[second]: second_url "Link"
[second_img]: second_image_url "Image"Renders on GH to the correct:
<p dir="auto">
<a href="crate_url" title="Link"><img src="crate_image_url" alt="Crate" title="Image" style="max-width: 100%;"></a>
<a href="second_url" title="Link"><img src="second_image_url" alt="Second" title="Image" style="max-width: 100%;"></a>
</p>However, earmark parses it to:
[
{
"p",
[],
[
{
"a",
[{"href", "second_url"}, {"title", "Link"}],
[{"img", [{"src", "crate_url"}, {"alt", "Crate][crate_img]"}, {"title", "Link"}], [], %{}}, "\n[", {"img", [{"src", "second_image_url"}, {"alt", "Second"}, {"title", "Image"}], [], %{}}],
%{}
}
],
%{}
}