[ 
https://issues.apache.org/jira/browse/DOXIASITETOOLS-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15182314#comment-15182314
 ] 

Hudson commented on DOXIASITETOOLS-160:
---------------------------------------

SUCCESS: Integrated in doxia-all #267 (See 
[https://builds.apache.org/job/doxia-all/267/])
[DOXIASITETOOLS-160] Normalize line endings in skin template content on 
SiteRenderer side rather that Velocity side (michaelo: 
[http://svn.apache.org/viewvc/?view=rev&rev=1733839])
* 
./doxia-sitetools/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
* 
./doxia-sitetools/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SkinResourceLoader.java


> Normalize line endings in skin template content on SiteRenderer side rather 
> that Velocity side
> ----------------------------------------------------------------------------------------------
>
>                 Key: DOXIASITETOOLS-160
>                 URL: https://issues.apache.org/jira/browse/DOXIASITETOOLS-160
>             Project: Maven Doxia Sitetools
>          Issue Type: Improvement
>          Components: Site renderer
>    Affects Versions: 1.7
>            Reporter: Michael Osipov
>            Assignee: Michael Osipov
>             Fix For: 1.8
>
>
> In DOXIASITETOOLS-87 all template line ending is normalied with custom 
> resource loader for Velocity but this is the wrong place because it is not a 
> Velocity problem. This problem is solely at {{SiteRenderer}} side.
> Revert DOXIASITETOOLS-87 and apply this rather simple patch to solve the 
> problem in the correct spot:
> {noformat}
> Index: DefaultSiteRenderer.java
> ===================================================================
> --- DefaultSiteRenderer.java  (revision 1733265)
> +++ DefaultSiteRenderer.java  (working copy)
> @@ -701,7 +698,9 @@
>  
>              try
>              {
> -                template.merge( context, writer );
> +                StringWriter sw = new StringWriter();
> +                template.merge( context, sw );
> +                writer.write( sw.toString().replaceAll( "\r?\n", 
> SystemUtils.LINE_SEPARATOR ) );
>              }
>              catch ( Exception e )
>              {
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to