custom markdown parser, back to top links and anchors on headers