+++ textnut [Jan 20 15 11:00 ]:
Example 459
](/url2) <p><img src="/url2" alt="foo bar" /></p>Base on spec, [bar] is interpreted to link then convert to literal text because it is inside image text. Is it good behaviour?
I think image text can not embed link is good option. So it render as:
<p></p>
As I say in this note,
Links inside image descriptions (and even inline images) might make sense if
the description is used as an image caption (as it is for links in
paragraphs by themselves, in some Markdown extensions). When the
description is used as the image’s alt text, a plain-text version of
the embedded link or image can be substituted.
I couldn’t think of any use for links within links, hence the asymmetry.
However, see Precedence of link within link · Issue #193 · commonmark/commonmark-spec · GitHub