- Reverted automatically attr_accessors in Sinatra. Too much magic.
- Fixed method_missing support
- Fixed whitespace errors
- Added some HTML5 tags to tpl-mode.el
- Bugfix: {{#sections}} and whitespace
- Bugfix: Strings used in sections no longer enumerate.
- Unary methods of Mustache view can now be used in sections as procs.
- Added instance-level versions of all view settings.
- Emacs mode: Support for dot notation
- Sinatra: Support for
mustache "views/in/sub/directories"
- Dot Notation: {{person.name}}
- Implicit Iterators: {{# people}} {{.}} {{/ people}}
- Automagic attr_readers for ivars you set in Sinatra routes.
- Ability to customize escaping by overriding Mustache#escapeHTML
- Mustache.render accepts a symbol to specify a template name.
- Bugfix: Struct can be used as sections again
- Bugfixes!
- Passing the full draft Mustache spec.
- Instance render:
@view.render(:thing => :world)
- Sinatra bugfix: 'layout not found' fix
- Sinatra bugfix:
mustache :"TEMPLATE.atom"
- mustache(1) bugfix: Render even without data.
- Higher Order Sections. See mustache(5) for details.
- Add inheritable class ivars on Mustache for @options.
- Added Inverted Sections (^). See mustache(5) for details.
- Added Template#source for accessing the template's string source.
- Bugfix: 1.9 encoding fix
- Sinatra Bugfix: 1.9 compat
- Sinatra: Bugfix for
mustache :view, :layout => true
- Mustache class now implements
partial
so you can callsuper
when providing a custompartial
method. - Bugfix: Allow slashes in tags, especially partials.
- Bugfix: Partials use the nearest context when being rendered.
- Bugfix: Partials returned by the partial method are now rendered.
- New, cleaner parser by Magnus Holm!
- Improved error messages!
- Bugfixes!
- Faster runtime!
- Sinatra 1.0 compatibility with layout tag overriding!
Mustache.compile
for compiling a template into Ruby.mustache -c FILE
to see a template's compiled Ruby.- Recursive partial support.
- Added
&
as an alias for the triple mustache (unescaped HTML). - Simpler examples. Old examples are now test fixtures.
- Ruby objects can be used in sections, not just hashes. See http://github.com/defunkt/mustache/commit/9477619638
- As a result,
TypeError
is no longer thrown when hashes are not passed. - mustache(1) man page is now included
- mustache(5) man page is now included
- tpl-mode.el has been renamed mustache-mode.el
- Improved README
- Added "mail merge" functionality to
mustache
script. - Support for multi-line tags (useful for comments)
- Sinatra Bugfix: Use Sinatra app's view path, not Sinatra base class'.
- Partial classes are no longer supported. Use modules!
- Added
mustache
script for rendering templates on the command line. - ctemplate compat: Partials are indicated by >, not <
- Bugfix: Context miss should return nil, not empty string. Fixes 1.9.x
- Bugfix: Ignore bad constant names when autoloading
- Partials now respect the
view_namespace
setting. - Added tpl-mode.el to contrib/ for us Emacs users.
- Rack::Bug bugfix: ensure benchmark is required before using it
- Rack::Bug: truncate too-large variables (click expands them)
- Stopped raising context miss exceptions by default
- Added
Mustache.raise_on_context_miss
setting (defaults to false) - Throw Mustache::ContextMiss when raise_on_context_miss is true and we encounter a miss.
- The default template extension is now "mustache" (instead of "html").
- Added the
view_namespace
andview_path
settings toMustache
- Added
Mustache.view_class
method which autoloads a class using the newview_namespace
andview_path
settings. Should be used by plugin developers. - Updated the Sinatra extension to use the new
view_class
method - Unclosed sections now throw a helpful error message
- Report line numbers on unclosed section errors
- Added Rack::Bug panel
- Bugfix: Partials in Sinatra were using the wrong path.
- Added mustache.vim to contrib/ (Thanks Juvenn Woo!)
- Support string keys in contexts (not just symbol keys).
- Bugfix: # and / were not permitted in tag names. Now they are.
- Bugfix: Partials in Sinatra needed to know their extension and path
- Bugfix: Using the same boolean section twice was failing
- Set Delimiter tags are now supported. See the README
- Improved error message when an enumerable section did not return all hashes.
- Added a shortcut: if a section's value is a single hash, treat is as a one element array whose value is the hash.
- Bugfix: String templates set at the class level were not compiled
- Added a class-level
compiled?
method for checking if a template has been compiled. - Added an instance-level
compiled?
method. - Cache template compilation in Sinatra
- Improved documentation
- Fixed single line sections
- Broke preserved indentation (issue #2)
- Mustache.underscore can now be called without an argument
- Settings now mostly live at the class level, excepting
template
- Any setting changes causes the template to be recompiled