ClientDependency
ClientDependency copied to clipboard
JS multiline comment is interpreted as unclosed regex
Hi
While trying minify the following file: https://github.com/DataTables/DataTables/blob/master/media/js/jquery.dataTables.js
The following exception is occuring: 'System.Exception: Error: JSMIN Unterminated set in Regular Expression literal'
Probably you don't escape multiline comments properly.
Here's the wrong interpretation:

Adrian
the minifier isn't smart, it's just fast. It doesn't produce an AST for minification so there are some edge cases where odd things will break it.
I won't have much time to look into this very soon, your best bet is to remove this syntax.
The minifier relies on an updated version of JsMin which i've been fixing over the years to support these odd edge cases, you can find it here: https://github.com/shazwazza/jsminsharp but it's a nightmare to debug (you should see the original!)