summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Nielsen <eric@amalgamar.com.br>2015-07-15 14:41:43 -0300
committerEric Nielsen <eric@amalgamar.com.br>2015-07-15 14:45:53 -0300
commitb9fe7ce618a9bf4f969a2b97f455fccb2ac42101 (patch)
treed0f08c4eae62d7a55264e5fd4c3997fdca7638fd
parent868ef4b309720f77586834e7a73e4b341ed4737a (diff)
downloadhandlebars.js-b9fe7ce618a9bf4f969a2b97f455fccb2ac42101.zip
handlebars.js-b9fe7ce618a9bf4f969a2b97f455fccb2ac42101.tar.gz
handlebars.js-b9fe7ce618a9bf4f969a2b97f455fccb2ac42101.tar.bz2
#1056 Added spec for nested raw block
-rw-r--r--spec/helpers.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/helpers.js b/spec/helpers.js
index 54ef0f2..f3257a5 100644
--- a/spec/helpers.js
+++ b/spec/helpers.js
@@ -28,6 +28,16 @@ describe('helpers', function() {
'raw block helper gets raw content');
});
+ it('helper for nested raw block gets raw content', function() {
+ var string = '{{{{a}}}} {{{{b}}}} {{{{/b}}}} {{{{/a}}}}';
+ var helpers = {
+ a: function(options) {
+ return options.fn();
+ }
+ };
+ shouldCompileTo(string, [{}, helpers], ' {{{{b}}}} {{{{/b}}}} ');
+ });
+
it('helper block with complex lookup expression', function() {
var string = '{{#goodbyes}}{{../name}}{{/goodbyes}}';
var hash = {name: 'Alan'};