Merge pull request #402 from banks/master

README example typo (properly fixed)
This commit is contained in:
Kevin Decker
2013-01-13 13:42:06 -08:00
+2 -2
View File
@@ -138,8 +138,8 @@ Handlebars.js also adds the ability to define block helpers. Block helpers are f
```js
var source = "<ul>{{#people}}<li>{{#link}}{{name}}{{/link}}</li>{{/people}}</ul>";
Handlebars.registerHelper('link', function(context, options) {
return '<a href="/people/' + this.id + '">' + context.fn(this) + '</a>';
Handlebars.registerHelper('link', function(options) {
return '<a href="/people/' + this.id + '">' + options.fn(this) + '</a>';
});
var template = Handlebars.compile(source);