Skip to content

Commit

Permalink
Remove mixing arg which is already covered by parentIndents
Browse files Browse the repository at this point in the history
  • Loading branch information
chowey committed Apr 23, 2012
1 parent eec0d00 commit 8ea4cd0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ var Compiler = module.exports = function Compiler(node, options) {
this.debug = false !== options.compileDebug;
this.indents = 0;
this.parentIndents = 0;
this.mixing = 0;
if (options.doctype) this.setDoctype(options.doctype);
};

Expand Down Expand Up @@ -235,7 +234,7 @@ Compiler.prototype = {
, pp = this.pp

// Block keyword has a special meaning in mixins
if (this.mixing && block.mode) {
if (this.parentIndents && block.mode) {
if (pp) this.buf.push("__indent.push('" + Array(this.indents + 1).join(' ') + "');")
this.buf.push('block && block();');
if (pp) this.buf.push("__indent.pop();")
Expand Down Expand Up @@ -316,9 +315,9 @@ Compiler.prototype = {
? args.split(/ *, */).concat('block').join(', ')
: 'block';
this.buf.push('var ' + name + ' = function(' + args + '){');
this.parentIndents++, this.mixing++;
this.parentIndents++;
this.visit(mixin.block);
this.parentIndents--, this.mixing--;
this.parentIndents--;
this.buf.push('}');
}
},
Expand Down

0 comments on commit 8ea4cd0

Please sign in to comment.