Fix typo in readme example

This commit is contained in:
Paul Banks
2012-12-30 17:23:11 +00:00
parent 28f377d169
commit ca22ca57e1
+1 -1
View File
@@ -139,7 +139,7 @@ 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>';
return '<a href="/people/' + this.id + '">' + options.fn(this) + '</a>';
});
var template = Handlebars.compile(source);