Skip to content

Commit

Permalink
Use pp for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
chowey committed Apr 25, 2012
1 parent 4c1a9a8 commit fd75320
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/compiler.js
Expand Up @@ -334,8 +334,8 @@ Compiler.prototype = {

visitTag: function(tag){
this.indents++;
var name = tag.name,
printIndent = this.pp && !tag.isInline();
var name = tag.name
, pp = this.pp;

if (!this.hasCompiledTag) {
if (!this.hasCompiledDoctype && 'html' == name) {
Expand All @@ -345,7 +345,7 @@ Compiler.prototype = {
}

// pretty print
if (printIndent)
if (pp && !tag.isInline())
this.prettyIndent(0, true);

if (~selfClosing.indexOf(name) && !this.xml) {
Expand All @@ -368,7 +368,7 @@ Compiler.prototype = {
this.visit(tag.block);

// pretty print
if (printIndent && 'pre' != tag.name && !tag.canInline())
if (pp && !tag.isInline() && 'pre' != tag.name && !tag.canInline())
this.prettyIndent(0, true);

this.buffer('</' + name + '>');
Expand Down

0 comments on commit fd75320

Please sign in to comment.