Make raw blocks operate like blocks
This commit is contained in:
@@ -131,13 +131,18 @@ var AST = {
|
||||
}
|
||||
},
|
||||
|
||||
RawBlockNode: function(mustache, content, locInfo) {
|
||||
RawBlockNode: function(mustache, content, close, locInfo) {
|
||||
LocationInfo.call(this, locInfo);
|
||||
|
||||
if (mustache.sexpr.id.original !== close) {
|
||||
throw new Exception(mustache.sexpr.id.original + " doesn't match " + close, this);
|
||||
}
|
||||
|
||||
content = new AST.ContentNode(content, locInfo);
|
||||
|
||||
this.type = 'block';
|
||||
this.mustache = mustache;
|
||||
mustache.sexpr.isHelper = mustache.isHelper = true;
|
||||
mustache.params.splice(0, 0, new AST.StringNode(content, locInfo));
|
||||
this.program = new AST.ProgramNode([content], locInfo);
|
||||
},
|
||||
|
||||
ContentNode: function(string, locInfo) {
|
||||
|
||||
Reference in New Issue
Block a user