Home » freemarker-2.3.13 » freemarker.template.utility » [javadoc | source]
public class: NormalizeNewlines [javadoc | source]

All Implemented Interfaces:

Transformer that supports FreeMarker legacy behavior: all newlines appearing within the transformed area will be transformed into the platform's default newline. Unlike the old behavior, however, newlines generated by the data model are also converted. Legacy behavior was to leave newlines in the data model unaltered.

From java:

SimpleHash root = new SimpleHash();

root.put( "normalizeNewlines", new freemarker.template.utility.NormalizeNewlines() );


From your FreeMarker template:

<transform normalizeNewlines>
<p>This template has all newlines normalized to the current platform's
Method from freemarker.template.utility.NormalizeNewlines Summary:
getWriter,   transform
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from freemarker.template.utility.NormalizeNewlines Detail:
 public Writer getWriter(Writer out,
    Map args) 
 public  void transform(Reader in,
    Writer out) throws IOException 
    Performs newline normalization on FreeMarker output.