[stringtemplate-interest] Output formatting issue
Tom Bentley
tom at egressive.com
Wed May 25 19:19:14 PDT 2005
> The problem is the "40". What if you need to do truncate but not in
> the middle of an HTML tag? I have been thinking about size of strings
> as you have seen on the list. I wonder if a truncate operator would be
> useful in general. I can easily make a renderer that truncates, but
> there is no way to pass it an argument...that is specifically
> disallowed in general as it would be too much like code, but perhaps a
> special operator would satisfy everybody :)
Is having a 40 somewhere in the template really /that much/ like code?
Perhaps only if that 40 can be the result of some other template, rather
than being a literal, or being bound outside the template (i.e. before
the template is evaluated).
OTOH, it seems a slightly arbirary restriction to insist that renderer
parameters be literals (or constants?).
Tom
More information about the stringtemplate-interest
mailing list