JShrink icon indicating copy to clipboard operation
JShrink copied to clipboard

Fix where "return/RegEX/" breaks minify

Open viable-hartman opened this issue 3 years ago • 0 comments

tinymce.min.js contains the following Javascript:

return/^[^:]+:\/\/\/?[^\/]+\//.test(t)

JSShrink does not call the saveRegex method for this Javascript string as it is not a recognized RegEx starting point.

By adding "n" to the strpos test before the saveRegex call, the return/RegEx/ situation is properly handled. In the above case.

When it is not properly handled, the \//.test(t) part of the RegEx is treated as a comment and is improperly truncated for tineymce.min.js.

viable-hartman avatar May 03 '21 21:05 viable-hartman