Commit Graph

2 Commits

Author SHA1 Message Date
adnrs96 3acf8b050d Add Django and html singleton tags support to pretty print.
In this commit we are modifying pretty print tool to support
Django and html singleton tags. For Addition of html singleton
tags template parser was modified to emit psudeo
html singleton end tags to accompany html singleton tags and
token class was updated to have line_span field.
2017-02-22 20:21:58 -08:00
adnrs96 e84cf7b6f1 tools: Create HTML pretty printer.
In This commit we extend the work being done by @showell in PR#1778
to develop a tool to pretty print html and our handlebar templates
in order to enforce our style convention of 4 Space indentation in
templates.

This commit introduces following changes:
* Fix Py3 Compatibility.
* Add ability to prettify in cases when html tags are not the
  starting of a line and addition of test cases for it.
* Add ability to lint handlebar tags and add test cases for it.
* Add {{else}} as special case of indent.
* Add test cases in general to testing new tool.

@showell Helped me throughout and reviewed this commit.

Fixes #1778
2017-02-15 07:34:43 -08:00