remove extraneous spaces between ++/+/--/-

fixes #1377
closes #1488
This commit is contained in:
alexlamsl
2017-02-18 19:33:53 +08:00
parent c06a50f338
commit ac0b61ed6e
2 changed files with 492 additions and 2 deletions

View File

@@ -254,8 +254,9 @@ function OutputStream(options) {
if (might_need_space) {
var prev = last_char();
if ((is_identifier_char(prev)
&& (is_identifier_char(ch) || ch == "\\"))
|| (/^[\+\-\/]$/.test(ch) && ch == prev))
&& (is_identifier_char(ch) || ch == "\\"))
|| (ch == "/" && ch == prev)
|| ((ch == "+" || ch == "-") && ch == last))
{
OUTPUT += " ";
current_col++;