I found the problem. It was failing locally too. The Markdown parser seems to have a hard time with
<a name="foo"/>
instead of
<a name="foo"></a>