Add end-tags to the anchors in the document.