Ignoring all line feeds in a FreeMarker template

Posted by Will on Stack Overflow See other posts from Stack Overflow or by Will
Published on 2010-05-13T18:55:02Z Indexed on 2010/05/13 20:04 UTC
Read the original article Hit count: 194

Filed under:
|

I'm trying out FreeMarker, not for a web application but to generate text within a desktop application. I'd like to get the text without any linefeeds, however it always appends a linefeed. For example, this would produce "blah blah\n"

<#if docType=1>
blah blah
<#if docType=2>
more blah
<#/if>

Any ideas? Bunching it all into one line works, but is horrible. Thanks.

© Stack Overflow or respective owner

Related posts about java

Related posts about freemarker