Input:
cmark gives me this:
$ cmark
[foo]: bar
---
<p>---</p>
This is different to the output in dingus:
I'd say that this is also incorrect because of the empty paragraph, but obviously at least one of cmark/commonmark.js is doing the wrong thing here.
I'm not certain what this should render to per the spec, but I think it should be interpreted as a link reference definition followed by a thematic break, and should render as just <hr />.