aboutsummaryrefslogtreecommitdiff
path: root/lib/output.js
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2012-09-08 15:38:58 +0300
committerMihai Bazon <mihai@bazon.net>2012-09-08 15:38:58 +0300
commit5a8e6ce735f6fbdf32fc730735843b225424e357 (patch)
tree553a1d49c4903a381742a44bae42920507a9cfd4 /lib/output.js
parent43c75c9248f3f2fe3732b263fc03d73528f005c8 (diff)
downloadtracifyjs-5a8e6ce735f6fbdf32fc730735843b225424e357.tar.gz
tracifyjs-5a8e6ce735f6fbdf32fc730735843b225424e357.zip
fix output for division followed by regexp
( v1 report: https://github.com/mishoo/UglifyJS/pull/458 )
Diffstat (limited to 'lib/output.js')
-rw-r--r--lib/output.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/output.js b/lib/output.js
index 5df1c2c4..c803fbae 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -141,10 +141,10 @@ function OutputStream(options) {
maybe_newline();
}
if (might_need_space) {
- if ((is_identifier_char(last_char())
+ var prev = last_char();
+ if ((is_identifier_char(prev)
&& (is_identifier_char(ch) || ch == "\\"))
- ||
- (/[\+\-]$/.test(last) && /^[\+\-]/.test(str)))
+ || (/^[\+\-\/]$/.test(ch) && ch == prev))
{
OUTPUT += " ";
current_col++;