fresfj / minify

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

multi-line strings cause problems in debug mode #279

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Minify commit/version: 2.1.5
PHP version: 5.4.7

What steps will reproduce the problem?
1. Create JS with a long multi-line string. Can happen anytime, depending on 
placement. Can consistently reproduce with any multi-line string spanning over 
50 lines.
2. Add file to minify bundle.
3. Attempt to load in debug mode.

Expected output: valid JS (focusing around line 50):
...
where\
the\
problem\
happens:\
See?';

Actual output: invalid JS:
...
where\
the\
problem\
happens:\

/* multi-line-string.js */

See?';

The problem is the '/* <file name */' insertion in the middle of the multi-line 
literal string creates invalid JavaScript.

Original issue reported on code.google.com by zaner...@gmail.com on 2 Dec 2012 at 11:41

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by mrclay....@gmail.com on 26 Aug 2013 at 2:17