Refactored asciidoc support for better performance