rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: Unknown8063 on January 16, 2009, 04:35:58 AM

Title: Macros and white space
Post by: Unknown8063 on January 16, 2009, 04:35:58 AM
I'm finally getting around to playing with template macros and noticed that white space tends to grow very rapidly around complex if structures.  That is white space that appears when I view source in my browser that is left behind from my macro indenting.

Because HFS interprets all macros before anything is sent to the browser this isn't an issue, I suppose.  I'm used to PHP and I was worried the excess white space would prevent my add header macro - but that wasn't the case.  HFS executes everything before it releases the buffer so you can actually use {.add header.} in the footer if you want to.

However, is there a way to contain macro scripts so they don't output anything to the browser?

EDIT: Oh! I just realized the {.comment.} macro can be used for this
Title: Re: Macros and white space
Post by: rejetto on January 20, 2009, 05:39:32 PM
great :D
i would have said {.trim.}
it reduces only spaces
{.comment.} will reduce anything
Title: How to find other users
Post by: jorge on January 21, 2009, 08:32:40 AM
Hi. i am try to find other users so that i can connect to please. the idea looks great.
looking forward to make it work and find other users.
Title: Re: Macros and white space
Post by: rejetto on January 22, 2009, 02:46:47 PM
other users for what?