self.left.print(output);
output.space();
output.print(self.operator);
- output.space();
+ if (self.operator == "<"
+ && self.right instanceof AST_UnaryPrefix
+ && self.right.operator == "!"
+ && self.right.expression instanceof AST_UnaryPrefix
+ && self.right.expression.operator == "--") {
+ // space is mandatory to avoid outputting <!--
+ // http://javascript.spec.whatwg.org/#comment-syntax
+ output.print(" ");
+ } else {
+ // the space is optional depending on "beautify"
+ output.space();
+ }
self.right.print(output);
});
DEFPRINT(AST_Conditional, function(self, output){