[stringtemplate-interest] Whitespace
Terence Parr
parrt at cs.usfca.edu
Thu Mar 25 12:13:06 PDT 2010
On Mar 23, 2010, at 5:35 PM, Andrew Bradnan wrote:
> Is there anyway to specify how much whitespace comes before the start of a template?
Unfortunately not. ST consumes all the white space before and after templates.
> Currently I have an attribute with a count. I'd like to turn that into "\t" * count (in Python speak). So if count was 10, I'd like 10 tabs before my template started.
Oh. that's easy using a renderer.
<x; format="10">
Then, for the type of variable x, register a renderer that knows how to interpret 10.
Ter
More information about the stringtemplate-interest
mailing list