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

Vojtech Knyttl commented on FREEMARKER-123:
-------------------------------------------

We often include templates that both set variables and produce text, eg:

definitions.ftl:
{code:java}
<#assign foo = ""/>

<#assign bar = ""/>

<#macro ...>
</#macro>

<#function ...>

</#function>
<html>
<head>
...
</head>
{code}
index.ftl
{code:java}
<#import header.ftl/>

...
{code}
In this particular case it could of course be avoided, but our codebase is much 
more complex and avoiding it would make the code not so easy to work with.

> Trim output whitespace
> ----------------------
>
>                 Key: FREEMARKER-123
>                 URL: https://issues.apache.org/jira/browse/FREEMARKER-123
>             Project: Apache Freemarker
>          Issue Type: Improvement
>            Reporter: Vojtech Knyttl
>            Priority: Major
>         Attachments: Screenshot 2019-11-20 at 14.00.56.png
>
>
> We use a lot of recursively included files, which might have a lot of 
> indentation. The result is, that we sometimes get even 30 empty lines before 
> `<html>`.
> !Screenshot 2019-11-20 at 14.00.56.png!
> It would be great to allow dropping all whitespace before first 
> non-whitespace chars.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to