Refactor, simplify and unify helpers for rendering markup

王权利请求将github/fork/jirutka/asciidoc-2合并到master

Created by: jirutka

This PR is closely related to #9288. I’m sending it separately to avoid unnecessary delays with reviewing and merging #9288.

合并请求报告