Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use `pp` for consistency

  • Loading branch information...
commit fd7532073e2fa383b63f9b823d43fae675df4786 1 parent 4c1a9a8
@chowey authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/compiler.js
View
8 lib/compiler.js
@@ -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) {
@@ -345,7 +345,7 @@ Compiler.prototype = {
}
// pretty print
- if (printIndent)
+ if (pp && !tag.isInline())
this.prettyIndent(0, true);
if (~selfClosing.indexOf(name) && !this.xml) {
@@ -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 + '>');
Please sign in to comment.
Something went wrong with that request. Please try again.