[stringtemplate-interest] summarizing white space and indentation
Zenaan Harkness
zen at freedbms.net
Mon Nov 9 14:51:36 PST 2009
On Mon, Nov 09, 2009 at 10:03:07AM -0800, Jonathan Buhacoff wrote:
>> On Mon, Nov 09, 2009 at 12:48:10PM +1100, Zenaan Harkness wrote:
>>> On Sun, Nov 08, 2009 at 12:59:43PM -0800, Jonathan Buhacoff wrote:
>>>> You could remove the \n from after foo like this:
>>>>
>>>> <if(x)>
>>>> foo<empty-> <! where empty is an empty template named "empty" !>
>>>> <endif>
>>>>
>>>> or
>> ...
>>> How about just <> and <->, for completely-empty template (if ever
>>> needed) and for white-space-removing empty template, respectively?
>>>
>>> Clean as it gets.
>
> I considered <-> but it's ambiguous about which direction it controls.
> Consider :
>
> Select * from <->
> Sometable where...
>
> It's not clear if the intent is to remove the space after "from" or to
> remove the newline before "sometable". It certainly shouldn't be both,
> that would cause an SQL syntax error.
>
> Select * from <\e->
> sometable where...
Yes I see. In that case, I think I prefer <""-> and <-"">, but
I don't think that matters much.
--
Free Australia: www.UPMART.org
Please respect the confidentiality of this email as sensibly warranted.
More information about the stringtemplate-interest
mailing list