Markdown: adjust link reference parser for the inconsistent design
choices presented by the official test suite