[ 
http://jira.codehaus.org/browse/MCHANGES-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_119891
 ] 

Benjamin Bentmann commented on MCHANGES-66:
-------------------------------------------

The removal of line breaks is simply caused by 
{code:java}
replace( '\n', ' ' )
{code}
which can be easily spotted in the patch and removed if required.

I adopted this behavior from Henning's patch which I considered useful as some 
kind of white-space normalization since one (at least me and my IDE) usually 
uses white-space in XML only for formatting of the XML input itself, and not 
for formatting of the output generated from the XML. Or is there any spec about 
the changes.xml that dictates to preserve white-space in certain elements?

If white-space normalization is OK, then however my patch should be further 
improved to deliver a proper normalization. I would define a proper 
normalization as
- no leading/trailing white-space (trim() in place)
- no consecutive white-space (missing)
- only 0x20 as white-space character (missing)

The last two aspects should be easily realizable via
{code:java}
replaceAll("\\s+", " ")
{code}
instead of the existing replace() calls.

> The changes plugin scatters white space over its Changes report
> ---------------------------------------------------------------
>
>                 Key: MCHANGES-66
>                 URL: http://jira.codehaus.org/browse/MCHANGES-66
>             Project: Maven 2.x Changes Plugin
>          Issue Type: Bug
>          Components: changes-report
>            Reporter: Henning Schmiedehausen
>            Assignee: Dennis Lundberg
>         Attachments: changes-report.html, changes.xml, changes4.patch, 
> changes7.patch, MCHANGES-66.zip, sax-parsing.patch
>
>
> The changelog plugin reads the contents of the changes.xml file and scatters 
> \n characters into it. The attached patch fixes this and also improves 
> performance by using a string buffer.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to