diff --git a/CHANGES.md b/CHANGES.md index dcb7c6c..8465157 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,7 @@ # mustache.js Changes ## 0.2 (??-??-????) - +* add streaming api * ctemplate compat: Partials are indicated by >, not <. * Add support for {{%PRAGMA}} to enable features. * Made array of strings an option. Enable with `{{%JSTACHE-ENABLE-STRING-ARRAYS}}`. diff --git a/README.md b/README.md index b7fa878..de3504e 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,13 @@ mustache.js does escape all values when using the standard double mustache synta Example: Using `{{variable}}` inside a template for `5 > 2` will result in `5 > 2`, where as the usage of `{{{variable}}}` will result in `5 > 2`. +## Streaming +To stream template results out of mustache.js, you can pass an optional `send()` callback to the `to_html()` call: + + Mustache.to_html(template, view, partials, function(line) { + print(line); + }); + ## More Examples and Documentation See `examples/` for more goodies and read the [original mustache docs][m] diff --git a/mustache.js b/mustache.js index c24995e..e785424 100644 --- a/mustache.js +++ b/mustache.js @@ -265,7 +265,7 @@ var Mustache = function() { return({ name: "mustache.js", - version: "0.3a", + version: "0.2a", /* Turns a template and view into HTML