add anchor func for doc-gen, html-gen