marvin-zhao / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Minify_Lines::_eolInComment problem #304

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Minify commit/version: 2.1.7
PHP version: 5.4.22

What steps will reproduce the problem?
1. Generate a js file with a comment in the style /* http://www.google.com*/
2. Include the js script using Minify in debug mode 

Expected output:
The next line in the file starts with /* line number */

Actual output:
The next line in the file starts with /* line number *|

Original issue reported on code.google.com by jmcust...@gmail.com on 27 Dec 2013 at 4:21

GoogleCodeExporter commented 9 years ago
Something I forgot to tell: this problems seems related to the regular 
expression inside Minify_Lines::_eolInComment. It replaces patterns like //.*?, 
so in the case of the url, it will replace from the // after the http: untile 
the end of line; removing the comment closing: */

Original comment by jmcust...@gmail.com on 27 Dec 2013 at 4:24

GoogleCodeExporter commented 9 years ago
//,gn=/\?/,yn=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bn=/([?&])_=
[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/

This is a part of a jquery file - it is also stripped (and all after that) due 
to this regex match

Original comment by wbar...@gmail.com on 25 Feb 2014 at 1:36