citylive/django-template-preprocessor — pull request #18 by cezarsa (2012-10-08 21:26:40+00:00)
Title: {% compress %} tag should only be handled if parsing html

This pull request changes how the preprocessor handles the compress tag when ```no-html``` is used. It also add test cases showing how the compress tag would behave with ```html```, ```pack-external-javascript``` and ```no-html```.

When only ```html``` is used (default), the compress tags are stripped and script/stylesheet references are rendered as they were on the template file.

When using ```pack-external-javascript```, the compress tags are stripped and the script is packed in only one file.

When using ```no-html```, the compress tags are kept as if they were any other custom template tag.

The reasoning behind this is that since ```DjangoCompressTag``` elements are only handled by the ```html_processor``` module we shouldn't add special cases for it unless we're parsing the template as html.