Re: comments trump newline?

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Wednesday, June 25, 2008, 10:14:24 AM, Jonathan Revusky wrote:

> This is the expected behavior, unless your template begins with something like
> <#ftl strip_whitespace=false>
>
> Whitespace between non-outputting elements (comments among them) is
> stripped.

I hope you don't keep this behavior with comments in 2.4. A comment
should not influence the output in any way, except that the whitespace
in its own line should be removed if the comment is the only thing in
that line (beside whitespace).

> Also, the whitespace on a line that contains only non-outputting
> elements is ignored.

Except that for user-defined FTL tags you don't know which is
outputting, so it's not entirely true.

> JR
>
> On Wed, Jun 25, 2008 at 6:39 AM, Zemian Deng <[email protected]> wrote:
>> Hi list,
>>
>> I have this template:
>>
>> ONE
>> <#-- comment here -->
>> TWO
>> <#-- -->
>> THREE
>> =====
>> ONE
>> <#-- comment here -->
>>
>> <#-- -->
>> THREE
>>
>> And I get this output:
>> ONE
>> TWO
>> THREE
>> =====
>> ONE
>> THREE
>>
>> Should I be getting a empty line above the second THREE? I tried with
>> multiple empty lines between comments, and they all get stripped out.
>> Is this expected?
>>
>> Thanks,
>> -Z
>>
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
>> _______________________________________________
>> FreeMarker-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/freemarker-user
>>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> FreeMarker-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemarker-user

-- 
Best regards,
 Daniel Dekany


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.