sqmk / pecl-jsmin

PHP PECL extension for JavaScript minification
Other
69 stars 21 forks source link

jsmin() removes line break after unterminated statement #50

Closed morozov closed 3 years ago

morozov commented 7 years ago

jsmin version: 2.0.1. Example code (note that the lines are padded with \t):

    var a = {
    }

    var b = {
    }

Expected output: something like:

var a = {}
var b = {}

Actual, syntactically invalid output:

    var a={ }   var b={ }

If the lines are not padded with anything or are padded with the space characters, the resulting output is valid.