[ https://issues.apache.org/jira/browse/DOXIA-529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14742806#comment-14742806 ]
Masatake Iwasaki commented on DOXIA-529: ---------------------------------------- Thanks for the comments. bq. 1. why the escape/unescape hack? It is needed in case the macro parameters contain "=" or "|". I used AptParser as a reference for this. XdocParser does not need this escaping because macro is defined as a part of Xdoc syntax and macro parameters can be parsed as fields. XhtmlParser needs escaping because the patch treats macro as not XHTML tag but plain string in HTML comment. I think {{escapeForMacro}} and {{unescapeForMacro}} could be moved to doxia-core and remove code duplication but only APT and XHTML are relevant now. bq. 2. why a new parse method? I fixed {{parse}} in order to copy source contents for macro processing. For example, TOC macro needs to parse copy of content to get section structure and section titles. I added {{parse}} to {{XhtmlParser}} rather than fix {{XhtmlBaseParser#parse}} in order to limit the effect of code change as far as possible. I think it is safer because {{XhtmlBaseParser}} is used by multiple modules. > Add macro support to XHTML > --------------------------- > > Key: DOXIA-529 > URL: https://issues.apache.org/jira/browse/DOXIA-529 > Project: Maven Doxia > Issue Type: Improvement > Components: Module - Xhtml > Reporter: Masatake Iwasaki > Attachments: DOXIA-529.001.patch > > > Adding macro support to XhtmlParser. It could be used by MarkdownParser which > uses XHTML as intermediate format for conversion. -- This message was sent by Atlassian JIRA (v6.3.4#6332)