A linter for Jinja-like templates
Project description
# jinjalint
A prototype linter which checks the indentation and the correctness of
[Jinja][jinja]-like/HTML templates. It works with
[Django’s templates][djangotemplates] too, it should work with
[Twig](https://twig.symfony.com/) and similar template languages.
This linter parses both HTML and Jinja tags and will report mismatched
tags and indentation errors:
```html
<div>
{% if something %}
</div>
{% endif %}
```
```html
<div>
<span>
</div>
</span>
```
```html
{% if something %}
<div> not indented properly
</div>
{% endif %}
```
```html
{% if something %}<a href="somewhere">{% endif %}
<p>something</p>
{% if not something %}</a>{% endif %}
```
This is a work in progress. Feel free to contribute :upside_down_face:
[jinja]: http://jinja.pocoo.org/docs/2.9/
[djangotemplates]: https://docs.djangoproject.com/en/1.11/ref/templates/language/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
jinjalint-0.0.3-py3-none-any.whl
(15.0 kB
view hashes)
Close
Hashes for jinjalint-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2438ab9dd9b0859ca7434fa50a2e28acf2da95fc771cbc574a031e3a9446a1b2 |
|
MD5 | f33b80ddf74b513ac7f2c9b7df28870e |
|
BLAKE2b-256 | fd0ae8c2cebbe115e27289e2474ad009a4346626e8e9c6983986923de915e6bc |