Fix md link substitution with anchors