fix output for division followed by regexp
( v1 report: https://github.com/mishoo/UglifyJS/pull/458 )
This commit is contained in:
@@ -141,10 +141,10 @@ function OutputStream(options) {
|
|||||||
maybe_newline();
|
maybe_newline();
|
||||||
}
|
}
|
||||||
if (might_need_space) {
|
if (might_need_space) {
|
||||||
if ((is_identifier_char(last_char())
|
var prev = last_char();
|
||||||
|
if ((is_identifier_char(prev)
|
||||||
&& (is_identifier_char(ch) || ch == "\\"))
|
&& (is_identifier_char(ch) || ch == "\\"))
|
||||||
||
|
|| (/^[\+\-\/]$/.test(ch) && ch == prev))
|
||||||
(/[\+\-]$/.test(last) && /^[\+\-]/.test(str)))
|
|
||||||
{
|
{
|
||||||
OUTPUT += " ";
|
OUTPUT += " ";
|
||||||
current_col++;
|
current_col++;
|
||||||
|
|||||||
Reference in New Issue
Block a user