Fixing Linked Images - The achilles heel

Any change in the syntax is not really welcome since the aim is compatibility and even more a change that just makes everything more ambiguous.

There is one interesting phenomenon when putting images inside shortcut reference links.

[![cats run wild]]
[![cats run wild][wildcats]]

  [wildcats]: cats.jpg
  [cats run wild]: cats.html

should result in

<a href="cats.html"><img alt="cats run wild" src="cats.html"></a>
<a href="cats.html"><img alt="cats run wild" src="cats.jpg"></a>

because it’s always the contents of the first inner pair of square brackets that is used as contents of the first pair of outer square brackets.

It seems only Maruku already handles this as I would expect. Some implementations, including CM reference implementations, just don’† support the shortcut link notation (and adding an empty pair of brackets at the end [] does’˝ seem to change anything), some refuse to put an URL ending in .html inside the src attribute of an img element.