From 510bfe0b052f3c4fc90714ff18fabd38e6a34909 Mon Sep 17 00:00:00 2001 From: Jaap Joris Vens Date: Thu, 9 May 2024 21:46:00 +0200 Subject: [PATCH] Update README --- README.md | 71 ++++++++++--------------------------------------------- 1 file changed, 13 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index 1e5f84c..8a20b89 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,19 @@ ***A pure-Python Django/Jinja template indenter without dependencies.*** +```jinja +{% block content %} +
+ {% blocktranslate trimmed %} + Don't you hate code that's not properly indented? + {% endblocktranslate %} +
+{% endblock %} +``` + DjHTML indents mixed HTML/CSS/JavaScript templates that contain [Django](https://docs.djangoproject.com/en/stable/ref/templates/language/) or [Jinja](https://jinja.palletsprojects.com/templates/) template @@ -15,64 +28,6 @@ other characters. The goal is to correctly indent already well-structured templates, not to fix broken ones. -### New! Multi-line HTML elements - -As of version 3, DjHTML indents multi-line HTML elements and -multi-line attribute values like this: - -```jinja -
- Don't you hate code that's not properly indented? -
-``` - - -### New! Multi-line CSS indentation - -Multi-line CSS values are now continued at the same indentation level: - -```jinja - -``` - - -### New! Improved JavaScript indentation - -Many new JavaScript indention rules have been added, such as the -indentation of method chaining: - -```jinja - -``` - - -### New! Tabwidth guessing - -Without the `-t` / `--tabwidth` argument, DjHTML no longer defaults to -a tabwidth of 4 but instead guesses the correct tabwidth. - - ## Installation DjHTML requires Python 3.8 or higher and is compatible with all