Open EricBrunel opened 7 years ago
I think I found the reason: in the file minification.py, line 94, the removal of the training newline seems to mess up the line numbers, and the rebuilding of the text from the tokens in token_utils.py / untokenize produces the wrong output. Commenting out line 94 in minification.py seems to solve the problem. This will probably leave an unneeded empty line in the text, but it will be removed afterwards anyway, so no big deal, I guess.
Very simple example with the following file:
The result of the minification is:
The second variable is not indented correctly: there's an extra space. So the minified code doesn't compile.