[
https://issues.apache.org/jira/browse/FREEMARKER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16222468#comment-16222468
]
Daniel Dekany edited comment on FREEMARKER-81 at 10/27/17 2:41 PM:
-------------------------------------------------------------------
I agree that it's a highly desirable feature (and then we already have
FREEMARKER-82 for it), but it's not a bug. The kind of whitespace removal that
FreeMarker (and most other template languages) currently supports basically
deletes some whitespace from the source code when the template is loaded. It's
like if you delete some whitespace from the template files yourself, only then
they would be hard to read. It has no runtime effect.
BTW, the background of this is that FreeMarker has originally focused on
generating dynamic HTML web pages, where whitespace is not significant, except
that you don't want to bloat response sizes with lot of superfluous whitespace.
Generating source code that will be read by humans requires a different kind of
whitespace handling.
As we already have FREEMARKER-82, can I close this as duplicate?
was (Author: ddekany):
I agree that it's a highly desirable feature (and then we already have
FREEMARKER-81 for it), but it's not a bug. The kind of whitespace removal that
FreeMarker (and most other template languages) currently supports basically
deletes some whitespace from the source code when the template is loaded. It's
like if you delete some whitespace from the template files yourself, only then
they would be hard to read. It has no runtime effect.
BTW, the background of this is that FreeMarker has originally focused on
generating dynamic HTML web pages, where whitespace is not significant, except
that you don't want to bloat response sizes with lot of superfluous whitespace.
Generating source code that will be read by humans requires a different kind of
whitespace handling.
As we already have FREEMARKER-81, can I close this as duplicate?
> <#nt> in combination with a <@macro > directive, only keeps indentation for
> the first line
> ------------------------------------------------------------------------------------------
>
> Key: FREEMARKER-81
> URL: https://issues.apache.org/jira/browse/FREEMARKER-81
> Project: Apache Freemarker
> Issue Type: Bug
> Components: engine
> Reporter: Brent
>
> <#nt> in combination with a <@macro > directive, only keeps indentation for
> the first line. Multiple lines in the macro, will put every line except the
> first without indentation.
> I actually propose a neater way to keep indentation of the line where
> <@macro> is used, to use as baseline for the entire macro.
> See my post on StackOverflow for an example:
> https://stackoverflow.com/a/46973468/2686165
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)