diff options
author | kpdecker <kpdecker@gmail.com> | 2015-01-18 13:23:45 -0600 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2015-01-18 13:23:45 -0600 |
commit | cb51b82b8e8114aaa3e1b19c41e5c4eebf0539d5 (patch) | |
tree | 386038a4a43f85e19dfee0f996cce66f10c10d8f /lib/handlebars/compiler/printer.js | |
parent | b0b522b4f81baf5ba4c190b59abd2b9cfe82bc77 (diff) | |
download | handlebars.js-cb51b82b8e8114aaa3e1b19c41e5c4eebf0539d5.zip handlebars.js-cb51b82b8e8114aaa3e1b19c41e5c4eebf0539d5.tar.gz handlebars.js-cb51b82b8e8114aaa3e1b19c41e5c4eebf0539d5.tar.bz2 |
Add support for dynamic partial names
Uses the subexpression syntax to allow for dynamic partial lookups. Ex:
```
{{> (helper) }}
```
Fixes #933
Diffstat (limited to 'lib/handlebars/compiler/printer.js')
-rw-r--r-- | lib/handlebars/compiler/printer.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/handlebars/compiler/printer.js b/lib/handlebars/compiler/printer.js index ad276f1..448331c 100644 --- a/lib/handlebars/compiler/printer.js +++ b/lib/handlebars/compiler/printer.js @@ -75,7 +75,7 @@ PrintVisitor.prototype.BlockStatement = function(block) { PrintVisitor.prototype.PartialStatement = function(partial) { var sexpr = partial.sexpr, - content = 'PARTIAL:' + sexpr.path.original; + content = 'PARTIAL:' + sexpr.name.original; if(sexpr.params[0]) { content += ' ' + this.accept(sexpr.params[0]); } |