Skip to content

Commit

Permalink
Force space after literal regexp when used in "instanceof" or "in"
Browse files Browse the repository at this point in the history
Close #118
  • Loading branch information
mishoo committed Feb 6, 2013
1 parent f36e4e9 commit 916faf0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,9 @@ function OutputStream(options) {
if (output.option("ascii_only"))
str = output.to_ascii(str);
output.print(str);
var p = output.parent();
if (p instanceof AST_Binary && /^in/.test(p.operator) && p.left === self)
output.print(" ");
});

function force_statement(stat, output) {
Expand Down

0 comments on commit 916faf0

Please sign in to comment.