Brent created FREEMARKER-82:
-------------------------------

             Summary: A new whitespace tag to indicate the baseline indentation 
for <@macro> and includes.
                 Key: FREEMARKER-82
                 URL: https://issues.apache.org/jira/browse/FREEMARKER-82
             Project: Apache Freemarker
          Issue Type: Wish
          Components: engine
            Reporter: Brent


Sometimes, perhaps most of the times, it is useful to split up small pieces of 
my template into macros or otherwise other templates to include.

However, since V2.3, lines containing only FTL tags get trimmed. This is 
annoying because I may want to include a macro or another template, with the 
current indentation of where I call it.

This brings me to my next point, as shown in my answer on StackOverflow, it is 
possible to keep this indentation with <#nt>, but this only works for the first 
line of the macro (see SO answer at the bottom).

So I propose an easy way to say "use the current indentation of the line, as a 
base of all the indentation for my macro or included template.

Any indentation inside the included template, or the macro would be relative. 
If one wished to break the relative indentation for a line inside their 
included template or macro, another tag should be foreseen to indicate that.

New tags:
* To indicate an indentation base for templates/macros
* To indicate that a line inside the included template/macro must not use the 
indentation base (so you can put lines that don't follow the indentation, 
perhaps <#t> already provides this functionality)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to