Tags: ecocity/mustache.php
Tags
* Added tests against the (forthcoming) Official Mustache Spec. If yo…
…u're interested in running them, you've gotta update submodules: `git submodule update --init`
* Updated Mustache.php to pass all tests against the Official Mustache Spec, including:
* Fixed issues rendering recursive partials and nested sections.
* Fixed a horde of whitespace quirks.
* Updated the `examples` tests to match the spec.
* This release *will* change whitspace output in most templates. The change is in the right direction, but consider this your warning :)
Fix a couple of quirks: 1. Double quotes are now escaped, per the mustache spec. 2. Associative arrays containing `null` values now work as expected (see http://hile.mn/8ZUs8m)
Mustache.php v0.3.0 changes variable precedence, which may break some…
… existing templates.
Class methods now take precedence over member variables of the same name. Given a Mustache class with a method `title()`, a member variable `$title`, and the template `{{title}}`, Mustache will now use the method instead of the member variable.
We also have 100% test code coverage. Sweet!
* Fix object sections: Iterable (and Traversable) objects referenced … …by section tags are properly treated as lists and iterated. All other objects are used for section context, but not iterated. * Update tests for PHPUnit 3.5+ * Make 'examples' test script more robust, fix it for PHP 5.2.
Multiple fixes, no API changes: * Fixed incorrect context inside partials. Partials now work with a view object of any class. * Fixed bugs with multiple invocations of render(). * Fixed incorrect handling of whitespace around tag names. * Stopped passing context arrays around all crazy-like, now using context as a proper stack.
PreviousNext