Adds required data attributes to markdown reference links.
/cc @DouweM @jschatz1
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/31748