Mustache v2.7.0 Release Notes

Release Date: 2014-08-26 // over 9 years ago
    • โž• Add template inheritance, via the BLOCKS pragma. Thanks @jazzdan and the rest of the @etsy devs!
    • โž• Add a pragmas option to the Mustache_Engine constructor for enabling default pragmas.
    • ๐ŸŽ A couple of performance improvements. Thanks @nizsheanez!
    • Code cleanup. Thanks @keradus!
    • Check coding standards on CI. Thanks @keradus!
    • ๐Ÿ›  Fix whitespace bug in nested partials. Thanks for the bug report, @mikesherov and @behance!
    • ๐Ÿ‘ Allow omitting the filters on closing section tags, for example, {{# a | b }}{{/ a }} is now valid.
    • โœ… Increase test coverage, improve comments and examples.

    ๐Ÿ“œ If you process Mustache parse trees yourselfโ€ฆ

    ๐Ÿ“œ Note that the parse tree representation of filtered interpolation and section tokens has changed. The tag name is now separate from the filters list. For example, the template:

    {{%FILTERS}} {{ foo | bar }}
    

    ๐Ÿ“œ was parsed as:

    [["type" =\> "%","name" =\> "FILTERS","line" =\> 0], ["type"=\> "\_v","name"=\> "foo | bar | baz","otag"=\> "{{","ctag"=\> "}}","line"=\> 0,"index" =\> 33]]
    

    ๐Ÿ“œ but is now parsed as:

    [["type" =\> "%","name" =\> "FILTERS","line" =\> 0], ["type"=\> "\_v","name"=\> "foo","otag"=\> "{{","ctag"=\> "}}","line"=\> 0,"index"=\> 33,"filters" =\> ["bar","baz"] ]]