[stringtemplate-interest] [ST4 Beta-2] Newline before '>>' not removed when defining region

Udo Borkowski ub at abego-software.de
Wed Jan 26 04:34:21 PST 2011


Typically the newline before the ">>" of a template definition is removed, i.e.

-----------
t() ::= <<abc>>
-----------

and 

-----------
t() ::= <<
abc
>>
-----------

produce the same output.

However when redefining a region (template) the newline before the >> is kept, i.e. 

-----------
@method.preamble() ::= <<System.out.println("enter");>>
-----------

and

-----------
@method.preamble() ::= <<
System.out.println("enter");
>>
------------

produce different output. (the 2nd version appends an extra newline)


Udo


More information about the stringtemplate-interest mailing list