JShrink icon indicating copy to clipboard operation
JShrink copied to clipboard

"Unclosed multiline comment" using /* ... /**/

Open anakonda3000 opened this issue 7 years ago • 2 comments

Hi

The minifier thows an error when I use following multiline comment:

var d = 1; /* test comment /**/ var d = 2;

This is a valid comment but not correctly handled by the shrinker.

BR

anakonda3000 avatar Sep 27 '17 12:09 anakonda3000

I'm also noticing this as well.

/* SOME STUFF HERE
* WILL
* FAIL */

Pangamma avatar Feb 03 '18 22:02 Pangamma

This is due to $js = str_replace('/**/', '', $js); in the initialize function.

Not even sure why that replacement is in there. It will get handled by the comment parser.

benjamw avatar Feb 08 '19 18:02 benjamw

Thanks for the issue! I've added the example into the test suite, and it appears that it was resolved in the refactor that removed the str_replace code.

tedivm avatar Mar 04 '23 23:03 tedivm