liftoff / pyminifier

Pyminifier is a Python code minifier, obfuscator, and compressor.
GNU General Public License v3.0
1.45k stars 223 forks source link

Module docstings on first line are not removed #66

Open johnthagen opened 8 years ago

johnthagen commented 8 years ago

The remove_docstrings function will not remove the module docstring from the following example file because it is on the first line:

"""My module summary.

Longer Description.
"""

x = 0

Not that there is no encoding or shebang line. For library code, there is no need to add a shebang or encoding value (the default encoding for Python 3, for example, is simply UTF-8).

Tested on Python 3.5