Open hatemelseidy opened 1 year ago
Hi,
Thanks for your report.
However, your example basically works as expected (I've added a double quote at the end of the base64 string):
python -mrjsmin <<<'consts: [[1, "container"], [1, "title"], [1, "code"], [1, "arg"], [1, "exhibits-container"], [1, "exhibit"], [1, "screenshot"], ["src", "data:image/png;base64,iVBO......//KyXm3KAwxw2QNQQhqQN8FSX/noEbGW5WA..."]],'
Output:
consts:[[1,"container"],[1,"title"],[1,"code"],[1,"arg"],[1,"exhibits-container"],[1,"exhibit"],[1,"screenshot"],["src","data:image/png;base64,iVBO......//KyXm3KAwxw2QNQQhqQN8FSX/noEbGW5WA..."]],
I suspect, it's running out of sync before - i.e. there's a missing double quote somewhere. Could you provide a reproducible example?
Thanks,
Thanks for getting back on this. It could be a bug in my setup, will try it on isolation and update the issue.
My javascript contains a line that looks like this
Trying to minify but I kept getting a syntax error
Uncaught SyntaxError: Invalid or unexpected token
After some investigation I noticed that a base64 encoded string of an image contained//
. And in the minified version, everything after the first appearance of//
is missing.