Closed gmgdeploy closed 5 years ago
Hi, have you updated to the latest version? It introduced basic support for template literals.
This happens on 1.1.0 (I raised this from a wrong account, sorry)
I cannot reproduce with your test case. Both of these give the correct result:
python -mrjsmin -p <<<'url = `${location.protocol}//${location.host}${url}`;'
python -mrjsmin <<<'url = `${location.protocol}//${location.host}${url}`;'
So what could be is that it falls out of sync before that code for some reason. Questions right now would be: 1) Do these examples work for you? 2) If yes, can you provide me a better one? :-) 3) If no, can you double-check that you're using the current version (starting from an empty venv perhaps)
Thanks.
I think I barked at the wrong tree. I'm using rjsmin via django-compressor, and it seems it's the latter that's responsible for doing this. sorry!
@krisb78 for what it's worth I noticed the same problem in webassets which maintains it's own copy of rjsmin which is a few versions behind this.
Hello,
When I have:
It gets minified to:
It seems that everything that follows '//' is interpreted as a comment and removed.