Permalink
Browse files

fix code block support to prevent multiple buffer openings

  • Loading branch information...
1 parent e9d1c83 commit 20a5db89426483fdb1e57c0732263c0dca1bfeab @logicalparadox logicalparadox committed with tj Oct 18, 2010
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/compiler.js
View
@@ -210,9 +210,6 @@ Compiler.prototype = {
// Wrap code blocks with {}.
// we only wrap unbuffered code blocks ATM
// since they are usually flow control
- if (!code.buffer && code.block) {
- code.val += ' {';
- }
// Buffer code
if (code.buffer) {
@@ -225,6 +222,7 @@ Compiler.prototype = {
// Block support
if (code.block) {
+ if (!code.buffer) this.buf.push('{');
this.visit(code.block);
if (!code.buffer) this.buf.push('}');
}

0 comments on commit 20a5db8

Please sign in to comment.