rolls up pretty much all the prior PRs at this time.
adds some py3 fixes on top of them
adds a setup.py file so wheels can be built
splits tests out into separate file, adds proper unittests
adds environment.policy support, so HTMLCompress 'globally strip' mode can be disabled (potentially eliminating need for SelectiveHTMLCompress)
adds {% strip [true|false] %} .. {% endstrip %} syntax, so certain blocks can be explicitly enabled/disabled.
large refactor of the parsing code to handle some edge cases from the issues
tried to make html entity tables roughly match HTML5 spec.
~I'm going to be using this a bit in production, so if/until this is merged, will try to keep my branch up to date.~ Update: After exploring how to enhance this extension further, I ran into a number of architectural obstacles, and decided that using jinja's lstrip_blocks & trim_blocks flags will probably be overall easier for me to deploy, despite those flags' "all or nothing" behavior.
This PR contains a big bundle of changes:
{% strip [true|false] %} .. {% endstrip %}
syntax, so certain blocks can be explicitly enabled/disabled.~I'm going to be using this a bit in production, so if/until this is merged, will try to keep my branch up to date.~ Update: After exploring how to enhance this extension further, I ran into a number of architectural obstacles, and decided that using jinja's lstrip_blocks & trim_blocks flags will probably be overall easier for me to deploy, despite those flags' "all or nothing" behavior.