maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Masatake Iwasaki (JIRA)" <>
Subject [jira] [Commented] (DOXIA-529) Add macro support to XHTML
Date Mon, 14 Sep 2015 02:20:47 GMT


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:
>             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

View raw message