djhtml
djhtml copied to clipboard
Django/Jinja template indenter
Hi there, just checked out this packge after the DjangoCon recommendation. It looks very nice but I guess I found an issue. The `djcss` is removing any indention of my...
I had some multi-line tags like: ``` ``` DjHTML indented them like so: ``` ``` I think it would be more nautral to retain the “attribute alignment”, and keep ``alt``...
The following JS within HTML: ```html window.fetch('/test.html') .then((html) => { document.body.innerHTML = html; }); ``` gets indented as: ```html window.fetch('/test.html') .then((html) => { document.body.innerHTML = html; }); ``` I would...
I have encountered a problem where djhtml sometimes does a non-safe reformatting that can break functionality on the page. I had a line in a template that looked like this...
Hi @JaapJoris! Without any changes, I now get this error: > DjHTML...................................................................Failed > - hook id: djhtml > - exit code: 123 > > Error: 'charmap' codec can't decode byte...
This is more of a feature request, but I'd love if this project standardized spacing within tags as well. For example, the following is currently unchanged: ``` {% if log.severity...
I'm using django-template-partials (https://github.com/carltongibson/django-template-partials) Its a nice library to create small components to be reused in templates. This library has 2 template tags and it formats them wrong: ``` {%...
A pretty common usecase is to have a base template that looks something like that: ``` {% block style %} .somecss { someproperty: somevalue; } {% endblock %} ``` Next...
Related to #81 Hi @JaapJoris , Upgraded to 3.0.6 version and receive next indentation problem: BEFORE: ``` .btn-secondary { @include button-variant( $secondary, $secondary, $color: $white, $hover-background: $primary, $hover-border: $primary, $hover-color:...
Slippers template tags can be used with and without children: ```django {% photo src='file.png' %} ``` vs. ```django {% #photo %} {% /photo %} ``` In case both versions are...