Skip to content

Commit a5d0491

Browse files
committed
Remove RawBlockNode in favor of prepareRawBlock helper
1 parent 12e3d21 commit a5d0491

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

lib/handlebars/compiler/ast.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,6 @@ var AST = {
9393
}
9494
},
9595

96-
RawBlockNode: function(sexpr, content, locInfo) {
97-
LocationInfo.call(this, locInfo);
98-
99-
this.type = 'block';
100-
this.sexpr = sexpr;
101-
this.program = new AST.ProgramNode([content], {}, locInfo);
102-
},
103-
10496
ContentNode: function(string, locInfo) {
10597
LocationInfo.call(this, locInfo);
10698
this.type = "content";

lib/handlebars/compiler/helpers.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ export function prepareRawBlock(openRawBlock, content, close, locInfo) {
2323
throw new Exception(openRawBlock.sexpr.id.original + " doesn't match " + close, errorNode);
2424
}
2525

26-
return new this.RawBlockNode(openRawBlock.sexpr, content, locInfo);
26+
var program = new this.ProgramNode([content], {}, locInfo);
27+
28+
return new this.BlockNode(openRawBlock.sexpr, program, undefined, undefined, locInfo);
2729
}
2830

2931
export function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) {

0 commit comments

Comments
 (0)