public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43c75c9
)
fix output for division followed by regexp
author
Mihai Bazon
<mihai@bazon.net>
Sat, 8 Sep 2012 12:38:58 +0000
(15:38 +0300)
committer
Mihai Bazon
<mihai@bazon.net>
Sat, 8 Sep 2012 12:38:58 +0000
(15:38 +0300)
( v1 report: https://github.com/mishoo/UglifyJS/pull/458 )
lib/output.js
patch
|
blob
|
history
diff --git
a/lib/output.js
b/lib/output.js
index
5df1c2c
..
c803fba
100644
(file)
--- 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++;