Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

StringTemplate 3.1 Release Notes

Brought to you by that maniac that brings you the ANTLR parser generator!

...

3.1 fixes a number of bugs (see the Bug list) and adds a few nice new features.

Enhancements

  • added elseif.
    No Format
    $if(x)$...$elseif(y)$...$else$...$endif$
    
    See Conditionally included subtemplates
  • added format option. See Object rendering#Format Option
  • updated group.g and eval.g so that list literals can have empty atoms like
    No Format
    $["a",,"b"]:{n | ...}; null="nullstring"$
    
  • Caleb Lyness revamped entire TestStringTemplate to run under windows.
  • Added 16 bit char unit test.
  • Allows unicode escapes as expression literals but only if it's the whole
    expression: <\uFEA5\n\u00C2> Previously could only do one char and just
    the special ones like <\n>.

Bug fixes

  • ST.dup() was not copying renderers field.
  • _ was not allowed in group/interface.g but in group.g. Now _ is allowed as first char.
  • John Snyders submitted a bug fix for length() and for format option. Renderer was being for string expr options
  • Thomas Brandon pointed out that we have a bug in our if/else computation. You could not reference super.attr inside the if/else sub templates.
  • i0 was not set when you applied a template to a single value.
  • ST-18 fixed. put close in a finally block.
  • "default" as a key (the string not keyword) was not a valid value in map. I had testLiterals looking even at strings in lexer for group.g. Fixes ST-15.
  • Property "getters" that return arrays were not converted to internal data structures necessary for ST to iterate over those elements.
  • Made convertArrayToList create an ArrayWrappedInList so it doesn't copy arrays any more.
  • Updated group.g to allow default clause by itself in map (from Caleb Lyness)
  • reader was not closed in PathGroupLoader.
  • $first(list).prop$ was not allowed. Fixed and added a unit test.