only add newline if there was a return\n before
This commit is contained in:
parent
8ded33e800
commit
bacec63561
4
rjsmin.c
4
rjsmin.c
@ -158,6 +158,7 @@ rjsmin(const rchar *source, rchar *target, Py_ssize_t length,
|
||||
goto skip_or_copy_ws;
|
||||
|
||||
default:
|
||||
xtarget = NULL;
|
||||
if ( target == tstart
|
||||
|| RJSMIN_IS_PRE_REGEX_1(*((pctoken ? pctoken : target)
|
||||
- 1))
|
||||
@ -182,8 +183,9 @@ rjsmin(const rchar *source, rchar *target, Py_ssize_t length,
|
||||
|
||||
reset = source;
|
||||
if (spaced == U('\n')) {
|
||||
*target++ = U('\n');
|
||||
spaced = U(' ');
|
||||
if (xtarget)
|
||||
*target++ = U('\n');
|
||||
}
|
||||
|
||||
*target++ = U('/');
|
||||
|
Loading…
Reference in New Issue
Block a user