maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Osipov (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (DOXIASITETOOLS-160) Normalize line endings in skin template content on SiteRenderer side rather that Velocity side
Date Sun, 06 Mar 2016 20:26:40 GMT

     [ https://issues.apache.org/jira/browse/DOXIASITETOOLS-160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael Osipov closed DOXIASITETOOLS-160.
-----------------------------------------
    Resolution: Fixed

Fixed with [r1733839|http://svn.apache.org/r1733839].

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

Mime
View raw message