3.2 Release Notes
StringTemplate 3.2 Release Notes
Brought to you by that maniac that brings you the ANTLR parser generator!
Terence Parr
University of San Francisco
parrt at cs dot usfca dot edu
Copyright 2003-2008
http://www.stringtemplate.org (StringTemplate released under BSD License)
Version 3.2, June 11, 2008
3.2 fixes a number of bugs (see the Bug list) and adds a few enhancements.
ANTLR v3.1 needs StringTemplate 3.2!
Enhancements
- Added \r\n normalization in AutoIndentWriter. Converts \r\n or \n to whatever the writer's newline instance var is. wrap="\n" will give the proper newline by locale as will \n and \r\n in the templates or even incoming data attributes (toString()'d of course). Added unit tests. It even works with special literals <\r\n> and <\n>.
- rest and strip returned iterators. Made them return show list copies so recursion works. iterators have side-effects. Added 2 unit tests.
- implemented trunc. returns all but last element.
- <aMap.(k)> no longer calls toString() on k. <aMap.keys:{k|<k>:<aMap.(k)>} was not working when aMap had Integer keys. Added unit test.
- Made unit tests not depend on map order. commented out tests that fail.
- debug tags now emit group name with tags. improves debugging ability.
Bug fixes
- ST-33 - repeated use of the list constructor does not work; a,b cat function used iterators; side-effect problem.
- Had a problem with "int" : "0" in a map but ST as incoming lookup key. Decided that I'd lookup as raw object first so Integer lookup works but I try toString version if not found. Document this!
- ST-36 - Angle bracket lexer, does not allow elseif
- ST-37 - null ptr in removeAttribute
- ST-39 - memory leak with embeddedInstances