Changelog
Ce contenu n’est pas encore disponible dans votre langue.
[1.54.0] - 2026-11-18
Section titled “[1.54.0] - 2026-11-18”Packaging
Section titled “Packaging”- The npm package no longer runs pip on whatever
python3it finds. It comes with its own Python and djLint, so it needs only Node.js 16.9 or newer, and works under pnpm and Bun, which skip the install scripts of dependencies. npm installs the build for the platform: Linux on x64, Arm64, ppc64le, s390x or riscv64 (with musl, on x64 or Arm64), macOS on x64 or Arm64, or Windows on x64, x86 or Arm64. Where PyPI has wheels of djLint compiled with mypyc, the build has the same one; on Linux for ppc64le, s390x and riscv64 djLint is pure Python.
[1.53.1] - 2026-11-17
Section titled “[1.53.1] - 2026-11-17”Bug fixes
Section titled “Bug fixes”H042no longer reports a<label for>that points at a<textarea>. When it looked for ids, it skipped every<textarea>,<script>,<style>and<pre>element whole, opening tag included, so anidwritten on one never counted.- The linter no longer skips what follows a custom element whose name starts with that of a raw text element, such as
<preview-card>or<script-x>. It used to read one as a<pre>or<script>that runs on to the next</pre>or</script>, or to the end of the file.
[1.53.0] - 2026-11-17
Section titled “[1.53.0] - 2026-11-17”Feature
Section titled “Feature”- The language server picks the profile from more of the language names editors use:
twig(Neovim, Helix, Emacs) getsnunjucks,htmlangular(Neovim) getsangular, and the names VS Code extensions give HubL, Spacebars, Mustache, Liquid and Go templates get the profile of their language.
Bug fixes
Section titled “Bug fixes”- Each item of an
excludeorextend_excludelist in the config file is one regex, whatever it holds, so a comma in it needs no\,and an unclosed{no longer joins the next item to it. - In a comma-separated
excludeorextend_exclude, a{,[or\inside a#comment no longer hides the entries after the comment. - An empty
excludeorextend_exclude, or an entry in one that holds only a comment, no longer excludes every file inside a folder. Each regex is checked on its own, so a trailing backslash in one is reported instead of swallowing the next.
[1.52.2] - 2026-11-17
Section titled “[1.52.2] - 2026-11-17”Bug fixes
Section titled “Bug fixes”- A comma inside an
excludeorextend_excluderegex, as inreport[0-9]{1,2}\.htmlor[,;], stays part of it. Such a regex used to be cut in two at the comma and match nothing, also when written in a list in the config file. A comma meant literally is written\,. - A
<!-- djlint:off -->written right before its<!-- djlint:on -->, with nothing between them, no longer hides the rest of the file from the linter. - A
.editorconfigdjLint isn’t allowed to read is left out, as editors leave it out, instead of stopping the run with a traceback.
[1.52.1] - 2026-11-17
Section titled “[1.52.1] - 2026-11-17”This version never reached PyPI or npm: its release build failed. 1.52.2 carries its fixes.
Bug fixes
Section titled “Bug fixes”- A pattern in
exclude,extend_excludeorper-file-ignoresthat isn’t a valid regular expression, such as the shell glob*.min.html, is an error naming the setting, with the regular expression to write instead. It used to stop the run with a traceback. A#comment at the end of anexcludeorextend_excludeentry no longer hides the entries after it. - The
djlint-handlebarsanddjlint-reformat-handlebarspre-commit hooks check.handlebarsand.mustachefiles as well as.hbs, in any case, and the Liquid hooks check.liquidfiles as well as.html. They used to skip them.
[1.52.0] - 2026-11-17
Section titled “[1.52.0] - 2026-11-17”Feature
Section titled “Feature”- New rule
D058reports a Django tag or comment that spans lines, such as a{# #}comment written over several lines or an{% include %}whose arguments go on to the next line. Django reads a tag only within one line, so it prints these as text, and an{% if %}split that way stops the template from compiling. Anything inside a{% comment %}or{% verbatim %}block is left alone, and so is a{%or{{that another tag follows before its closing, whichT039reports. - New rule
D059, off by default, reports consecutive lines that each hold only a{# #}comment, which a{% comment %}block holds as one. Adjlint:directive and a translator comment never join such a run, and comments inside<pre>and<textarea>are left alone, since the line breaks they leave show on the page there. - djLint warns about a djLint file that sits beside the one it reads and so isn’t read, such as a
djlint.tomlnext to[tool.djlint]inpyproject.toml, or a.djlintrcnext to adjlint.toml. .editorconfigfiles are read as editors read them, for each file by its own path: the nearest.editorconfigwins, the ones above it fill in what it leaves out, and one withroot = trueends the search, which goes no higher than the project root. Sections match by the EditorConfig globs, paths included, so[pages/*.html]sets only the templates inpages, andunsetdrops a value that a file above gives. Only the project root’s.editorconfigwas read, and its settings went to every file of the run.
Bug fixes
Section titled “Bug fixes”- A switch in a configuration file takes
trueorfalseagain, nothing else. 1.51.0 also read"yes","on","1"and other words for one, which is now an error naming the file. The text"true"or"false"still works, with a warning to write it without quotes, and so does a number written as text, such as"100". - The warning about a code in
includethat never runs no longer names thehtmlprofile when none is set. It says the rule never runs without a profile, where the linter followshtml. - A
pyproject.tomlwithout djLint settings no longer stops the search for the configuration, so a package in a monorepo with its ownpyproject.tomlgets the settings of the repository instead of none. The search still stops at a folder with adjlint.toml,.djlint.toml,.djlintrc,.djlint_rules.yamlor apyproject.tomlwith[tool.djlint], and never goes past the root of the repository (.gitor.hg).
[1.51.0] - 2026-11-16
Section titled “[1.51.0] - 2026-11-16”Feature
Section titled “Feature”- djLint warns about settings that would not do what they look like, so a typo no longer goes unnoticed. The warnings go to stderr once per run, as the others do:
- a name in a configuration file that is not a djLint setting, with the closest one it knows, as
max_line_lengthformax_line_lenghtormax-line-length; - a rule code in
ignore,includeorper-file-ignoresthat no rule has, with the right case forh006; a code in bothignoreandinclude, which stays off; and a code inincludethat the profile never runs, such as T028 underdjango; --indent-cssor thecsssettings withoutformat_css, the same for JavaScript, andformat_attribute_js_json_patternorformat_attribute_js_json_min_propswithoutformat_attribute_js_json.
- a name in a configuration file that is not a djLint setting, with the closest one it knows, as
- The language server shows these warnings in the editor, each once until the configuration changes, and so does a setting the editor sends that djLint doesn’t know, with the closest one it does. The editor’s ones used to go only to the server’s log.
djlint.api.load_configtakeson_warning, a function that gets every warning about the settings, for a program that shows them itself. Without it, they go to stderr once per process, as before.- A switch in a configuration file can also be written as the words configparser takes, in any case:
"yes","on","true"or"1"for on,"no","off","false"or"0"for off, and the numbers 1 and 0.
Bug fixes
Section titled “Bug fixes”- The text
"false"in a configuration file turns a switch off. Any text used to turn it on, so"format_css": "false"formatted CSS. A value that is no switch, such as"maybe", is now an error naming the file, as a number setting that is no number already was. - A number setting written as
trueor with a fraction, such asindent = trueormax_line_length = 100.5, is an error. They used to become 1 and 100. A whole number written with a fraction part,100.0, still counts. - A
linter_output_formatnaming a field djLint doesn’t have, such as{lin}, is reported when the run starts, with the fields it can name. The run used to fail at the first finding. per-file-ignorestakes a list of codes for a pattern, as the other options with several values do, such as"base.html" = ["H030", "H025"]. A list used to make linting fail.
[1.50.4] - 2026-11-15
Section titled “[1.50.4] - 2026-11-15”Bug fixes
Section titled “Bug fixes”includeturns on a rule that the profile leaves out, so--include=T003now runs T003 without a profile or under--profile=html. Before, the template rules (T) and the rules for one template language (D, J, M, N) stayed off there, whateverincludesaid. A rule still stays off under a profile it doesn’t apply to, such as T028 underdjangoor H012 underangular.- Without a profile, the linter runs the same rules as under
--profile=html. A custom rule with anexcludelist used to be skipped there, as underall. djlint --helpand the docs no longer callhtmlthe default profile. Without one, djLint formats the template syntax of every language, asalldoes, and lints with the rules ofhtml.
[1.50.3] - 2026-11-15
Section titled “[1.50.3] - 2026-11-15”Packaging
Section titled “Packaging”- Lower the minimum required dependency versions to the oldest ones djLint works with. 1.50.2 raised some of them because of problems in those packages, such as a warning jsbeautifier emits or missing wheels for Python 3.11, rather than anything djLint needs:
- jsbeautifier from 1.14.10 back to 1.13.0
- pathspec from 0.10.0 back to 0.9.0
- pyyaml from 6.0 back to 5.1
- regex from 2022.9.11 to 2020.10.22
[1.50.2] - 2026-11-15
Section titled “[1.50.2] - 2026-11-15”Packaging
Section titled “Packaging”- Raise the minimum required dependency versions to ones that work on Python 3.11, djLint’s oldest supported version:
- jsbeautifier from 1.13.0 to 1.14.10. Older releases have an invalid escape sequence, which Python 3.12 and newer warn about the first time djLint formats JavaScript.
- pathspec from 0.9.0 to 0.10.0. Older releases accept an invalid
.gitignoreline such asbuild\without an error. - pyyaml from 5.1 to 6.0 and regex from 2021.8.21 to 2022.9.11, the first releases with wheels for Python 3.11.
- The npm package has the same description as the one on PyPI, which lists the template languages. PyPI links the changelog and the issue tracker, and both mention the language server in their keywords.
[1.50.1] - 2026-11-14
Section titled “[1.50.1] - 2026-11-14”Bug fixes
Section titled “Bug fixes”- The error for a
.djlint_rules.yamlthat isn’t valid YAML fits on one line. It ran over three, and editors that show the last line of a failure showed only where in the file the problem was. - When the last line of a multiline template tag starts with a closing bracket, as in
]) }}, the line lines up with the line that opened that bracket. It used to line up with the tag.
[1.50.0] - 2026-11-11
Section titled “[1.50.0] - 2026-11-11”Bug fixes
Section titled “Bug fixes”- With Click 8.5.1 or newer,
djlint --helpno longer lists a blankSRC ...row under “Other”. The files to check are still shown in the usage line. - A template that is not valid UTF-8, or that djLint isn’t allowed to read or write, no longer aborts the run with a traceback and a request to report a bug. djLint names the file and the reason, checks the rest and still exits
2, because that file went unchecked.--github-outputadds an error annotation on the file, and--sarifreports it as a notification on a run marked as not successful. - A configuration file djLint can’t read, such as a
pyproject.toml,djlint.tomlor.djlintrcwith a syntax error or a file named by--configuration, is now a usage error that exits2. djLint used to print a red line and check the templates against its defaults, so the run could pass. The same goes for a number setting with a value that isn’t a number, such asmax_line_length = "wide", and for a.djlint_rules.yamlthat isn’t valid YAML or doesn’t hold a list of rules, which crashed with a traceback. An empty.djlint_rules.yamlno longer crashes. In the Python API,load_configraisesclick.UsageErrorfor these. - Ctrl+C exits
130, as shells report an interrupted command, rather than1, which means djLint found something. The same goes fordjlint --lsp.
[1.49.10] - 2026-11-07
Section titled “[1.49.10] - 2026-11-07”Packaging
Section titled “Packaging”- Ship a
py.typedmarker, so type checkers read the annotations ofdjlint.api. - Importing
djlint.apino longer builds the command line, which takes a little off the start of editors and other programs that use djLint from Python. The command line moved out of thedjlintpackage itself, which still hands outmain,processandprocess_stdinwhen they are asked for.
[1.49.9] - 2026-11-04
Section titled “[1.49.9] - 2026-11-04”Bug fixes
Section titled “Bug fixes”- A U+2028, U+2029, U+0085 or form feed in the arguments of a call or the value of a
{% set %}that is not JSON, as in a string passed to{{ url("…", x) }}, is kept as written. It was rewritten as a line break, which changed the string. - H057 reports a video whose only track has an empty
kind, as in<track kind="">or<track kind>. Browsers read an emptykindasmetadata, not subtitles, so such a track carries no captions. H057 took it for a subtitles track. - The error about a number setting that is not a number names the file the value was read from, such as
djlint.toml,.djlintrcor the file--configurationnames. It always saidpyproject.toml.
[1.49.8] - 2026-11-03
Section titled “[1.49.8] - 2026-11-03”Feature
Section titled “Feature”- A
makoprofile for Mako templates. Mako needs a control line, such as% if x:or% endfor, and a##comment to start a line of their own, and other profiles joined them onto other lines, which broke the template. Under themakoprofile they always keep their own lines, and the lines between% ifand% endif, or between a<%block>or<%def>tag and its closing tag, are indented like any other block. The code in a${}expression is left as written, and so are the attributes of a tag that depend on control lines, Python blocks,<%doc>and<%text>, and a script or style holding Mako syntax under--format-jsor--format-css. The linter runs the HTML rules. Theallprofile handles Mako’s lines the same way. - Twig’s
{% apply %},{% sandbox %}and{% guard %}blocks and Django’s old{% ifequal %}and{% ifnotequal %}blocks indent their contents like other blocks.
Bug fixes
Section titled “Bug fixes”- A number setting written in a config file as a list, a table or null, as
max_line_length = [100]or"indent": null, is reported and falls back to its default, as a string that is no number already did. djLint failed instead. - An end tag that closes no open block, such as the end of a custom block djLint does not know, as in
{% endtoc %}, or a stray{% endif %}, stays at the level of the markup around it. It moved one level to the left, and so did everything after it. - A string written as adjacent literals, as in
{{ _("Hello " "world") }}or{% set x = "a" "b" %}, or in triple quotes, keeps its quotes. They were dropped, which left{{ _(Hello world) }}, a variable name rather than a string.
Performance
Section titled “Performance”- A tag whose quoted value runs over thousands of lines, as when its closing quote is missing, no longer slows formatting down. Forty thousand such lines took over seven seconds and now take about one.
- Text with many
${that never close no longer slows formatting down. Three thousand of them in one paragraph took ten seconds and now take a tenth of one.
[1.49.7] - 2026-11-03
Section titled “[1.49.7] - 2026-11-03”Feature
Section titled “Feature”- djLint warns about a setting that has no effect:
max_blank_linestogether withpreserve_blank_lines, which takes precedence, and--prefer-configurationwithout--configuration. The warning goes to stderr once per run, so the language server does not repeat it on every change.
Bug fixes
Section titled “Bug fixes”- A closing tag missing its
>, as in</pat the end of a line, again runs to the next>, as browsers read it. Since 1.49.5, the tag on the next line was taken for an opening tag, so each paragraph after such a line was indented one level deeper than the one before.
[1.49.6] - 2026-11-03
Section titled “[1.49.6] - 2026-11-03”djlint --helpgroups the options by what they are for: modes, files, configuration, the linter, output, layout, rewrites, and CSS and JavaScript. They used to come in one long list in no particular order.
[1.49.5] - 2026-11-03
Section titled “[1.49.5] - 2026-11-03”Performance
Section titled “Performance”- A file with many tags that are never closed formats in under a second. A thousand lines that each start with
<p data-x="atook 40 seconds, 1,500 lines of<ptook over a minute, and 2,000 ran out of memory. Thousands of<script>,<style>or<textarea>tags that are never closed no longer slow down formatting or linting either: linting 4,000 of them took up to 23 seconds.
Bug fixes
Section titled “Bug fixes”--format-jsleaves a<script>alone when itstypeis neither JavaScript nor JSON, such as a client-side template in<script type="text/template">. It was formatted as JavaScript, which broke the template. Scripts without atype, modules,text/babeland JSON types such asapplication/ld+jsonare formatted as before.- A
<script>or<style>tag with attributes too long for one line has them spread over lines also when its contents take several lines, as any other tag does. With--format-jsor--format-css, one run spread them and the next joined them again. - With
--format-jsor--format-css, the contents of a script or style that follows other markup on its line, as in<span>a</span><script>, are indented below that line. After</noscript><script>, the next run indented the rest of the file one level deeper. - With
--format-js, JavaScript that js-beautify lays out differently on each run, such as a ternary written over several lines, settles on one layout, so a second run leaves it alone. --format-cssno longer takes a<styleinside a JavaScript string, as innew RegExp("<style(.*?)>"), for a style tag. It formatted the rest of the script as CSS.--format-jsand--format-cssno longer read a<script>or<style>written inside an HTML comment, as in<!-- <script> -->, as the start of a block. Everything from it to the next real closing tag was formatted as JavaScript or CSS.
djlint --helpdescribes each option more clearly. It now gives the defaults that come from.editorconfig, lists theallprofile, and names what a value holds, such as--ignore CODES.--warnno longer claims to turn errors into warnings: it only changes the exit code. The configuration page uses the same wording.- The help and the docs for
--max-blank-linessay that it has no effect with--preserve-blank-lines, which keeps every blank line.
[1.49.4] - 2026-11-03
Section titled “[1.49.4] - 2026-11-03”Performance
Section titled “Performance”- A template with hundreds of lines that each open a
{{,{% set %}or{% include %}left unclosed, as in{{ 'aon every line, formats in well under a second. Four hundred such lines took from 45 seconds to seven minutes. Linting such lines withT002no longer slows down the same way. - A tag holding thousands of template tags written without spaces, as in
<script {%a%}{%a%}…>, formats and lints in well under a second. It took tens of seconds.
Bug fixes
Section titled “Bug fixes”- Formatting a template a second time no longer changes it in the cases below, so
djlint --checkpasses right afterdjlint --reformat. - An element or a template block is put on one line only when the whole line fits within
--max-line-length, its indentation and any text beside it included. A line that fit only without its indentation was joined, and the next run spread its attributes. - A tag whose attributes fit within
--max-attribute-lengthonce astyleorsrcsetvalue loses its trailing;or extra spaces stays on one line. It was spread, and the next run joined it again. - A
{% blocktrans trimmed %}inside a{% filter %}no longer ends the filter early. Everything after it lost its indentation, and the next run indented the{% endfilter %}again. - An empty
<script>or<style>written across lines, whose attributes are longer than--max-attribute-length, has them spread when it is put on one line. It took a second run. - A tag written in a string inside a
{{ }},{% %}or mako${ }that spans lines, as inHTML('<a class="x" href="y">')on a line of its own, no longer has its attributes spread over several lines. That put line breaks into the string, which in mako is an error, and the next run moved them again. - A template tag in an attribute value that holds the value’s own quote and an apostrophe, as in
value="{{ _("Students' list") }}"or mako’svalue="${_("Students' list")}", no longer upsets the layout of the lines that follow. The quote was read as the end of the value and the apostrophe as the start of another. - A stray quote in a tag, as in
<button "="" title="x">orid="a"", no longer stops djLint from reading the tags after it. Only a quote after=opens a value, as browsers read it. Before, the rest of the file was skipped: the linter reported its elements as orphans (H025) and the formatter indented them differently on each run. A quote inside a bare value, as intitle=a'b, is part of the value for the same reason. - A
>in a string of a template tag inside an attribute value, as indata-x="{{ "a > b" }}", no longer ends the tag. The formatter took out the space beside it, which changed the string. - Text inside a template tag in an attribute value is left as written. The formatter collapsed the spaces in
class="{{ "a b" }}", closed up"a = b", joined a line break in a string in astyleorsrcset, split astyleat a;or asrcsetat a,inside a template tag, and with--format-jsor--format-csstook a>in one for the end of the<script>or<style>tag. - A tag with a single attribute is no longer spread over several lines because its line is longer than
--max-line-length, as the rule for long lines intends. A lonestylewas split at each;, and the next run could join it again. - A tag with a
styleorsrcsetattribute that has no value no longer stops the formatter with an error when its attributes are spread over several lines. - A
type="text/javascript"ortype="text/css"is dropped, and a form’smethodlowercased, also when the value is written without quotes or with spaces around=. It used to take a second run. - A call written on the line after
{{, with}}on a line of its own, stays where it was written. It used to be pulled up onto the{{line with its arguments a level too deep, which the next run corrected. - A template tag written across lines inside an attribute value keeps its layout, including the indentation of the line it closes on.
- Whitespace inside a quoted string that spans lines in a template tag, as in
{% set %}or{% trans %}, is kept, also when the string holds a%},{%,}}or{{, or a comment before it holds a quote. It was stripped or replaced with indentation, which changed the string. - A short template block written across lines stays that way also when it holds a string whose quotes the formatter rewrites, as in
{% if x %}followed by{{ _('Deleted') }}on its own line. It used to be put on one line. - The formatter drops a
typeonly where it is the element’s default:text/javascripton a<script>, andtext/csson a<style>or a<link rel="stylesheet">. A<script type="text/css">, a<style type="text/javascript">, a custom element such as<script-x>, and a<link>that is not a stylesheet keep theirs, as does a<link>whoserela template tag helps write or comes after one (arelinside a{# #}comment does not count). So does an attribute with a longer name, such as@typeor@method. Atypeormethodnext to a template tag written with-, as in{{- x }}, is left as written, since dropping the type would join what the-trims.H024reports the same cases, also when the value is written without quotes or with spaces around=. - A default
typeis kept when the browser might not read it: when anothertypefollows in the same tag, as in<script type="text/javascript" type="module">, since a browser reads the first one, and when a template tag that may write atypeof its own follows, as in<script type="text/javascript" {{ attrs }}>. A template tag that is part of a value, as insrc={{ url }}ordata-x="{{ "a > b" }}", does not count, and neither does text inside a string of a template tag, as in{{ '}} type=text/javascript' }}. A defaulttypewritten twice, as intype="text/javascript" type=text/javascript, is dropped both times in one run. - A template comment written after the last attribute of a tag, as in
<div class="x" {# note #}>, is kept. With a profile that has{# #}comments, the formatter deleted it. - An unquoted attribute value next to a template tag written with
-, as inclass=x {{- suffix }}orclass={{ c -}} x, stays unquoted. The-joins the text beyond it onto the value, and quoting the value left that text outside, which changed the attribute. - A template tag written against an attribute or against the tag name, as in
<option value="x"{% if a %} selected{% endif %}>or<li{{ attrs }}>, stays there when the attributes are spread over several lines. A line break or space was put between them, which the page then rendered. H056no longer reads asrcwritten inside a template tag, as in<img {% if src %}class="a"{% endif %} src="a.png">, as an emptysrcof the tag.
[1.49.3] - 2026-11-02
Section titled “[1.49.3] - 2026-11-02”Bug fixes
Section titled “Bug fixes”- A
{% set %}written across lines indents the arguments of a function call inside it, as it already did for the items of a list or dict (#2819). Its last line stays at the level of the value when it holds part of the value, the lines after the tag are no longer one level too shallow when a bracket opened inside it closes on its last line, a bracket inside a quoted string no longer changes the indentation, and a line that goes on with a string started on the line before is no longer indented, which put spaces into the string.
[1.49.2] - 2026-11-01
Section titled “[1.49.2] - 2026-11-01”Performance
Section titled “Performance”- Checking or linting a folder of many templates takes about half the time, most of all on Windows. A small run no longer starts worker processes, which cost more than they saved.
- The language server answers in about a third of the time when the editor sends its settings with every request, as the VS Code extension does, and its memory no longer grows over a long session.
- Every run starts a little faster, unless it uses
--use-gitignore. - A line of many inline tags before a block tag, which a stray quote such as
"=""can leave in a template, no longer takes minutes to format. - A very large template no longer formats disproportionately slower than a small one: a 1.1 MB template formats in a third of the time.
[1.49.1] - 2026-11-01
Section titled “[1.49.1] - 2026-11-01”Bug fixes
Section titled “Bug fixes”- The language server no longer loses the settings of an editor that took over five seconds to answer, and updates the findings of open documents once the answer arrives.
- The language server keeps its settings when the editor sends a change of settings meant for other servers.
- The language server sees changes of settings in editors that report them only to servers that ask, and reads the settings again when a workspace folder is added or removed.
excludeapplies in the language server as it does todjlint <folder>: a document invendor/of a folder with nopyproject.tomlwas not left out.- The language server picks up a change of the configuration, or of a file named by
configurationorrules, when a document is opened or saved, also in editors that don’t watch files, and updates every open document then. - The language server no longer stops on some malformed messages, and formats a document with old Mac line endings (CR only) without sending an edit past its end.
- Linting a template with Windows line endings from stdin reports what the rules on blank lines find, as linting the file does.
- A
python_modulerule that returns acode,matchormessagethat isn’t a string gets a clear error.
[1.49.0] - 2026-11-01
Section titled “[1.49.0] - 2026-11-01”Features
Section titled “Features”djlint --lspruns a language server, for findings as you type and formatting in any editor that supports LSP. See Language server.djlint.api.is_excluded()tells whether the configuration leaves out a file.
Bug fixes
Section titled “Bug fixes”- With
--stdin-filename, djLint formats the text it is given even if the configuration setsfiles. It formatted those files instead, so an editor formatting a template rewrote them and left the template as it was. --stdin-filenamehonorsexclude,extend-excludeand--use-gitignore: the text of an excluded file comes back unchanged, with no findings.
[1.48.1] - 2026-10-31
Section titled “[1.48.1] - 2026-10-31”Performance
Section titled “Performance”- A long run of
$before a tag no longer makes linting slow: a line of two hundred thousand of them went from 2.2 seconds to 0.15. Formatting such a line is still slow.
[1.48.0] - 2026-10-31
Section titled “[1.48.0] - 2026-10-31”Feature
Section titled “Feature”- Add
djlint.api, a supported way to format and lint text from Python:load_config(),format_text()andlint_text(), which returns findings with numeric positions. See Python API. - A finding now knows where it ends.
--linter-output-formattakes{end}, SARIF reportsendLineandendColumn, and GitHub annotations cover the whole finding. A custom rule’spython_modulecan returnend, and otherwise ends where itsmatchdoes. - A custom rule’s
python_moduleis also looked for in the project root, after everything else on the path, so it works with thedjlintcommand as well as withpython -m djlint.
Changed
Section titled “Changed”- A
python_modulerule that returns alinethat isn’t a position now stops djLint with an error naming the rule, instead of a traceback from the report.
- A tag whose attributes are spread over several lines, but that doesn’t start its line, as in
<li><a …>orRead the <a …>, is laid out from that line. The attributes line up under the first one, or with--single-attribute-per-linesit one indent in from the line with the closing>at the line’s indent. They used to be indented as if the tag started the line, so they landed left of the tag, or a single space in after text.
[1.47.1] - 2026-10-26
Section titled “[1.47.1] - 2026-10-26”preserve-inlinein thejssettingbrace_styletakes effect, so{ bubbles: true }stays on one line in a<script>or in an attribute formatted with--format-attribute-js-json. It used to be dropped before the code was formatted.- The json schema allows any option under
cssandjs, so a strict validator such as Tombi no longer reportsindent_sizethere.
[1.47.0] - 2026-10-22
Section titled “[1.47.0] - 2026-10-22”Feature
Section titled “Feature”- New option
--sort-load-tags/sort_load_tagssorts the libraries in a{% load %}tag and drops the ones written twice, so{% load static i18n %}becomes{% load i18n static %}. In{% load a b from library %}the names beforefromare sorted. It is off by default: where two libraries define a tag or filter of the same name, the one loaded last wins, so sorting can change which one a template uses. - The formatter drops the spaces
H012reports around an attribute’s=, so<div class = "a">becomes<div class="a">.
Changed
Section titled “Changed”H010reports the names the formatter lowercases, in any mix of case, soWidth="3"is now reported. A framework binding such as:itemIDor@IDand a longer name such asdata-IDno longer are, since the formatter leaves their case alone.H018is not reported under--close-void-tags, since the formatter then writes the/>ending the rule reports.--ignore-casealready worked this way forH009andH010.
H020reports an empty pair whose end tag has whitespace before its>, such as<div></div\n>.H026reports aclassoridholding only whitespace, such asclass=" ", and one written with spaces around the=.H033reports an action padded at both ends once. It used to report it twice, unless an attribute beforeactionhappened to make the two reports look the same.- Markup written inside an attribute value, as in
<p title="<img src='a'>">, is text, andH005,H008,H010,H012,D018,J018,H024,H026,H029andH033no longer report it.H046andH051readtabindexandrolefrom the tag’s own attributes, sotabindex=1written in a value or in the page text is not reported either. T001andT027read a tag holding a dict, such as{{ f({"a": {"b": 1}}) }}, up to the}}that closes it rather than the first}}inside it.T032steps over an escaped quote in a string, so the spaces in{{ x|default:"a \"b c\"" }}are not reported.H015reports a heading followed by a tag on the same line anywhere in the file. It used to look only at the last line.- The rules that read a tag’s attributes step over a template tag written in it, including a handlebars
{{{attrs}}}and a dict as in{{ {'class': 'x'}|xmlattr }}, so<img {{ attrs }} src='a'>is reported byH008, which used to stop reading at the{{. T038steps over a string in a block tag, so the{%in{% with a="{%" %}does not cut the tag short.
Performance
Section titled “Performance”- The rules that read a tag’s attributes stop at a stray
<, andH015,H030,H036,T001,T027,T038andT039no longer read the rest of the document again for each tag. A file holding thousands of unclosed tags or headings on one line is linted in a fraction of a second, where it used to take minutes.
[1.46.6] - 2026-10-15
Section titled “[1.46.6] - 2026-10-15”Packaging
Section titled “Packaging”- Ship the license of the mypyc runtime, which the binary wheels include, in
LICENSE-THIRD-PARTY. - Upload PEP 740 attestations to PyPI, so you can verify that the distributions were published from the GitHub Actions workflow of this repository.
[1.46.5] - 2026-10-14
Section titled “[1.46.5] - 2026-10-14”Packaging
Section titled “Packaging”- Drop support for EoL Python 3.10.
[1.46.4] - 2026-10-01
Section titled “[1.46.4] - 2026-10-01”- A line that opens a template block now indents the lines inside it when the rest of the line looks like a single-line html tag. Before, html in a string argument, as in
{% call modal("<strong>" ~ n ~ "</strong>") %}, or inline html right after the opening tag, as in{% if a %}<b>x</b>, left the block’s contents at its own level, and its closing tag ended up one level too far out.
[1.46.3] - 2026-09-28
Section titled “[1.46.3] - 2026-09-28”Performance
Section titled “Performance”- A long run of unclosed
{{or{%no longer makes linting and formatting quadratic. Each was read again from every opener to the end of the line or the file, so eight thousand{{on one line took over half a minute to lint and as long again to format, and twenty thousand in one attribute value tookH054alone 80 seconds; each now takes well under a second. A second opener is taken to mean the first one never closed, which is how the tokenizer already read them.T038still reads an unclosed{%up to the next%}, as django does, so a run of those stays slow there.
- A
>inside a string of a template tag no longer ends the html tag around it when the string reuses the attribute’s quote, as inclass="{{ classes|default:"[&>a]:flex" }}". Before, the linter lost the rest of the tag, soH037missed a repeated attribute after it, and the formatter put a line break inside the string. H054no longer reads an attribute out of a{# #}comment in another attribute’s value, as in<a title="{# " href #}">, and leaves an input alone when an{% if %}writes its type and another tag writes the value, as in{% if shown %}type="{% if hidden %}hidden{% else %}text{% endif %}"{% endif %}.- A
{#inside a{{ }}or{% %}tag, as in{{ "{# x" }}or an ICU message such as{n, plural, one {# item} other {# items}}, no longer opens a comment that runs to the next#}in the file. Before, the linter skipped everything in between, soT038reported the{% if %}before it as unclosed andT041missed an{% extends %}after it, and the formatter left the lines in between unformatted. A tag ends at its first closing delimiter, which is where django ends it.
[1.46.2] - 2026-09-19
Section titled “[1.46.2] - 2026-09-19”- Each option on the configuration page now carries the release that brought it, so a reader held to an older djLint can tell at a glance what is there to reach for. The page’s filter searches the versions too.
- djLint publishes its own json schema at https://djlint.com/schema/djlint.json.
Packaging
Section titled “Packaging”- The minimum required regex version is lowered from 2022.6.2 back to 2021.8.21, the first release that ships wheels for Python 3.10, which is djLint’s own minimum.
[1.46.1] - 2026-09-08
Section titled “[1.46.1] - 2026-09-08”- A second
{# #}comment on a line no longer swallows everything back to the first one, so a tag written between two comments is formatted and linted like any other. Before, it kept lines past--max-line-lengthand hid findings from the rules. A comment now ends at its first#}, which is where django, jinja and nunjucks end it.
[1.46.0] - 2026-09-07
Section titled “[1.46.0] - 2026-09-07”Feature
Section titled “Feature”- New rule
T041reports an{% extends %}that is not the first tag in the template, which django refuses to compile and which leaks whatever text comes before it into the page. A{# #}comment before it is left alone, as is anything inside a{% comment %},{% raw %}or{% verbatim %}block, named or not, a{# djlint:off #}region or yaml front matter. An html comment is reported, since it is written into the page ahead of the parent template’s doctype, and so is a branch tag on the django profile, where{% if x %}{% extends "a.html" %}{% endif %}does not compile; jinja documents that form and keeps it. - New rule
T042reports text or html written after{% extends %}and outside every{% block %}, which the engine silently discards. A template tag there still runs and is left alone, as are comments and the body of a{% macro %}. - New rule
T043reports a block name used more than once in a template, which Django, Jinja and Nunjucks all refuse to parse, even where the two blocks sit in different branches of an{% if %}. A{% blocktrans %}, a named{% endblock %}, a block inside a template comment, a{% comment %}block or a{% raw %}or{% verbatim %}body, and the blocks an{% embed %}fills in another template are left alone; a block inside an html comment or a<script>counts, since the engine still parses it. - New rule
T044reports a statement keyword inside an output tag, such as{{ if x }},{{ url 'home' }}or{{ endif }}, where a{% %}block tag was meant. A bare keyword such as{{ url }}is an ordinary variable and is left alone, as is an expression that merely starts with one of the names, such as{{ url ~ "/x" }},{{ url ? url : '#' }}or{{ block ('title') }}, and so is the body of a{% raw %}or{% verbatim %}block, named or not. - New rule
T045reports a statement tag, such as{% include %}or{% if %}, written inside an html comment, where it still runs. A value printed into a comment, as in<!-- built {{ version }} -->, is left alone, and so is a bare Go keyword such as<!-- period {{ start }} to {{ end }} -->, which is an ordinary variable under every other profile, and a{%under handlebars and golang, which have no such syntax. A tag inside a template comment, a{% comment %}block or a raw block is left alone whether it is written with whitespace control, tabs or a named closing tag, as is one inside an Internet Explorer conditional comment, in any case and closed by its<![endif]-->; one left unclosed is the ordinary comment a browser reads it as and is reported. - New rule
H053reports anidused more than once in the file, which breaksgetElementById,<label for>and fragment links. Two ids in exclusive branches of one{% if %}are never both rendered and are not reported, whichever language writes the branch, and neither are two ids in separate<template>fragments; a value written by a template tag is left alone. - New rule
H054reports an interactive element nested inside another, such as a<button>inside an<a href>or a link inside a button. An<a>without anhrefis not interactive and is left alone, as is a hidden input or one whose type a template tag writes. - New rule
H055reports alangon<html>that is not a language tag, such aslang="english",lang="en_US"or a value that is only whitespace, whichH005reads as present. An empty value is left toH005, and so is a value written by a template tag or by a php short echo, as inlang="<?= $lang ?>", while a value that merely starts with$or{, such aslang="$LANG", is read as written. A>written inside a template tag ahead of the attribute, as in{% if a > b %}, does not hide it. - New rule
H056reports an emptysrcon an element that fetches what it names, such as<img src="">or<script src=""></script>, which a browser resolves to the page itself. Asrcwith no value at all counts too, while an unquoted value such assrc=/static/logo.png, a value written by a template tag, a value that is only whitespace, and the separatesrcsetanddata-srcattributes are left alone. - New rule
H057reports a<video>with no captions track, which WCAG 1.2.2 requires for prerecorded video with sound. A<track>of kindcaptionsorsubtitlescounts, as does one with nokind, since subtitles is the default, while a commented out track and one written inside an attribute value do not; amutedvideo is left alone, as is one whose tracks or attributes a template tag may write, meaning a real{{,{%,{#or${rather than the brace of a css value or the$of a jQuery handler or a price. - New option
--sarifwrites the findings as a SARIF 2.1.0 document, which GitHub code scanning, Azure DevOps and most editors read, so a run can be uploaded and kept in the Security tab with history rather than shown only as annotations on one pull request. With--check, a file that would be reformatted is reported under aformattingrule.
- A mako
<% %>or<%! %>code block is left as written, since its body is python rather than markup. Formatting re-indented it, flattening areturn "unit"inside anifto the start of the line and leaving python that no longer parses, and a tag written in a python string was read as markup, soH025,H054andT001reported findings inside these blocks. A<%def>body is markup and is still formatted and linted. H037no longer reads an unquoted attribute value as an attribute name, so<img width=1 height=1>is not reported as a duplicate1. This started in 1.45.0, and a real duplicate whose values are unquoted and start with/,.or#, as inhref=/a href=/b, is now caught too.
[1.45.2] - 2026-09-04
Section titled “[1.45.2] - 2026-09-04”- A space beside a template block is kept where the line break next to it is one a
{%-or-%}marker strips. The break normally renders the space itself, so djLint drops the space as redundant, but a stripped break renders nothing:{%- if args -%}, {% endif %}followed by{%- for %}lost the space between a macro’s arguments.
[1.45.1] - 2026-09-04
Section titled “[1.45.1] - 2026-09-04”H037no longer reads a quoted string inside a template tag as an attribute name, sohref="{{ url "/a/b" "/a/c" }}"is not reported as a duplicatea. This started in 1.45.0.- A jinja call written over several lines keeps its closing bracket at the indent of the tag holding it, rather than pulling
) }}to the start of the line. - Arguments nested inside a jinja call written over several lines keep their depth, so the inner argument of
{{ function([nested(...)]) }}is no longer dedented by one level. - An element after a line that closes both a template block and an html tag, as in
{%- endif %}:</b>, keeps its own level instead of being indented one further. - A template tag written over several lines inside an attribute keeps the indentation the author gave it, so the body of
data-x='{{ f({ ... }) }}'no longer loses a space from every line. --single-attribute-per-linereaches attributes guarded by a template tag, so{% if x %} a="1" b="2" {% endif %}inside a tag no longer keeps them on one line past--max-line-length.- A tag whose attributes push its line past
--max-line-lengthis spread over several lines, where before only--max-attribute-lengthdecided. A line long because of its text is left alone, since breaking text would change what renders. - A tag whose name a template writes, as in
<{{ tag }}>, is read as a tag. It was not recognised at all, so a template block among its attributes was pulled out of the tag and re-indented to the start of the line, and its attributes went unformatted and unchecked.
[1.45.0] - 2026-09-03
Section titled “[1.45.0] - 2026-09-03”Feature
Section titled “Feature”- New rule
H043reports a<button>written without atype. A type written inside a template block, as in<button {% if a %}type="button"{% endif %}>, counts. - New rule
H044reports a header row holding boththandtdcells. The emptytdthat opens a two-axis table’s header row is allowed. - New rule
H045reports an<iframe>with no accessible name.title,aria-labelandaria-labelledbyall count, as does a name written by a template tag. - New rule
H046reports a positivetabindex.0and-1are left alone, as is a value written by a template tag. - New rule
H047reportsaria-hidden="true"on an element that takes focus. Hiding a decorative icon is not reported, nor is adisabledcontrol or one withtabindex="-1". - New rule
H048reports anaria-attribute that ARIA does not define, such as a misspelledaria-lable. Framework bindings like:aria-labelare left alone. - New rule
H049reports a viewport that stops the page being zoomed, byuser-scalable=noor amaximum-scalebelow 2. - New rule
H050reports an element html no longer defines, such as<center>,<font>,<marquee>or<strike>. Only the opening tag is reported, and a custom element whose name merely starts with one, such as<font-picker>, is left alone. - New rule
H051reports aroleARIA does not define for markup, such asrole="buton". The roles DPUB-ARIA and GRAPHICS-ARIA add count, abstract ones such aslandmarkdo not, and a value written by a template tag or a framework binding such as:roleis left alone. - New rule
H052reports a<meta http-equiv="refresh">that reloads or redirects on a timer, which fails WCAG 2.2.1. A delay of zero is an immediate redirect rather than a timer and is not reported. - New option
--quote-style/quote_stylesets the quotes djLint writes inside template tags,double(the default) orsingle, andT002follows it, so{% include 'a.html' %}is no longer reported in a project that writes single quotes. Html attributes stay withH008. - New option
--sort-attributes/sort_attributesorders a tag’s attributes by name, withidfirst andclasssecond. A tag whose attributes are guarded by a template tag, as in<div {% if x %}a="1"{% endif %} b="2">, keeps the order it was written in. - New option
--name-endblocks/name_endblockswrites the block’s name into the{% endblock %}that closes it, where the block spans several lines, makingT003fixable by running the formatter. A block opened and closed on one line is left alone. - New option
--no-indent-inner-html/no_indent_inner_htmlleaves<head>and<body>at the same indent as the<html>that holds them, matching the default VS Code html formatter. - New option
--keep-br-inline/keep_br_inlinekeeps<br>on the line of the text it breaks instead of giving it a line of its own.<hr>is unaffected, and the default is unchanged. - New option
--prefer-configurationlets the file named by--configurationoverride the project’s ownpyproject.tomlor.djlintrc, which have always won where the two set the same thing. The default is unchanged. - Single quoted attribute values are rewritten to double quotes, as
H008asks, so<div class='a'>becomes<div class="a">. Only the names the rule reports are touched, and a value holding a double quote of its own keeps its single quotes. - Attribute names that
H010reports are lowercased by the formatter, so<div CLASS="a">is fixed rather than only reported. A name the rule does not know, such as an svgviewBox, keeps its case, and--ignore-caseturns it off. - Formatting writes an entity reference as the character it names, so
©becomes©, which is whatH023asks for. Entities that carry syntax or template meaning are left as written, as are<pre>,<textarea>,<script>and<style>bodies, and--no-entity-formattingturns it off. - The
typethat html5 already assumes is dropped, asH024asks, so<script type="text/javascript">becomes<script>, and the same for<style>and a stylesheet<link>. A type that means something, such astype="module", is kept. - A form’s
methodis lowercased, somethod="POST"becomesmethod="post", which is whatH029asks for. A tag written inside a template tag’s string is left alone.
Changed
Section titled “Changed”H031is gone: the keywords meta tag it asked for no longer affects ranking, and bing treats it as a spam signal.H035is gone;H017already coversmeta.H036reports only two uses of<br>: a run of two or more, and a break against the inside edge of a block element. Breaks that are part of the content, such as in a postal address, are left alone, and the rule is on by default.T002is on by default, and--reformatnow writes the quotes it asks for, rewriting tag arguments and conditions such as{% if x == 'a' %}to the--quote-stylein force. A string already holding the quote it would be rewritten to is left alone.T028is off by default: the whitespace it strips can be whitespace that renders, soalt="{%- if brand -%}Acme{%- endif -%} logo"comes out asAcmelogo. It stays available with--include=T028.H014counts blank lines the way the formatter does, so--max-blank-lines 2and--preserve-blank-linesno longer produce files the linter then rejects. A line holding only whitespace counts as blank, and the report points at the first blank line rather than the content line above it.H020leaves alone an element whose empty form carries meaning, such as a blank<option>holding a select open.H023no longer reports an entity for an invisible character, such as‌, in named, decimal or hex form.--ignore-caseapplies to the linter as well as the formatter, soH009andH010stay quiet when it is set.--profile=allhonours every profile’sexcludelist, soT028no longer fires on django markup to recommend{%- if -%}, which django rejects.- A GitHub annotation names the column as well as the line, so it lands on the tag rather than the start of the line.
- Markup inside an attribute value is no longer read as a tag, so
<p title="a<br>b">is not reported: affectsD004,J004,H006,H011,H013,H017,H018,H019,H020,H021,H022,H036andH043. D004,H019andH021see attributes written after a template tag containing a>, so the inline style in<div {% if n > 5 %}id="a"{% endif %} style="color:red">is checked.- Rules check the opening tag of
<script>,<style>,<pre>and<textarea>, which used to be skipped along with the body, soH024,D004,H008,H010,H011,H012andH037can see their attributes. Only the body is skipped now, and its contents are never read as markup. D018andJ018no longer report a link that already uses a url tag, such as<a href="{% url 'profile' %}" data-src="lazy">; a value now has to look like a path./static/and/media/assets are left to{% static %}rather than reported as routes.H005reports<html lang="">, and its message asks for a non-emptylang.H005andH007ignore custom elements whose name starts withhtml, such as<html-midi-player>.H007reports a missing doctype in a file that opens with something it does not recognise, such as an<?xml ... ?>declaration.H008leaves single quoted values holding a double quote alone, such astitle='{% translate "Delete" %}'. An attribute that merely ends in a known name, such asdata-title, is no longer treated as that attribute.H009reports exactly the elements the formatter lowercases, so--reformatalways clears it:<IMG>,<INPUT>and<NAV>are now reported, andG,PATH,NAMEandCACHEare not. An uppercase name inside an attribute value, as in<p title="x <DIV y">, is no longer read as a tag.H012sees attributes written after a{{ ... }}in the same tag, so the spaced=in<div {{ attrs }} class = "x">is reported.H013accepts a valuelessalt, so<img src="a.png" alt>passes as the decorative imagealt=""already did.H016recognises a<title>however it is written, so<title id='page-title'>no longer reads as a missing title and an svg<title>no longer counts as the document’s. The report points at the<html>tag.H022no longer reads anhttp://inside another attribute’s value as a link, and no longer reports loopback or private hosts:localhost,127.0.0.1,192.168.x,10.xand.localor.testnames.H024covers<link rel="stylesheet" type="text/css">.H025no longer calls a tag an orphan in a handlebars or go template: a wrapper opened in one branch of{{#if}}...{{else}}...{{/if}}and closed in the other is accepted, as in django and jinja.H029reads only the form’s ownmethodattribute, so<form data-method="POST">is not reported.H030stays quiet for a base layout that fills its description in per page, so a head using{% block meta %}is no longer reported.H033sees a form whose earlier attribute holds a>, as in<form x-show="count > 0" action=" /x/">.H037counts an attribute written without a value, so<input required required>is reported as the duplicate it is.H042leaves a label alone in a partial that holds no form control. A control that is commented out still counts, so the label above it is checked.T001andT027no longer read a delimiter inside a string as the end of the tag, so{{ x|default('}}') }}is reported neither as needing padding nor as holding an unclosed string. A string that really does run past the tag is still reported.T032flags extra whitespace in tags that hold a|,(,),:,?or%, which were previously skipped. A run of spaces inside a string is still content and is left alone.T034no longer flags a}%written inside a string, so{% trans "Save 50}% today" %}is left alone.T039no longer reports a valid block tag holding a nested mapping such as{% set a = {"x": {"y": 1}} %}, a shape--reformatitself produces.T040allows an empty literal that only feeds a filter, as in{% extends ""|default:"base.html" %}.- Markup written as text inside
<script>,<style>or<textarea>is left alone;var s = "<DIV CLASS=x>"is no longer rewritten to"<div CLASS=x>". - An attribute value written without quotes is now quoted, as
H011asks, soclass=onebecomesclass="one". A value carrying a quote of its own, such asa=b'c, is still left alone. - Strings inside a
{% set %}or a function call keep their own quotes when they hold the other kind, so{% set s = 'say "hi"' %}is left as written instead of escaped. - Arguments spread over their own lines inside
{{ }}stay where they are; the first is no longer pulled up against the opening bracket. - Spacing is no longer added before a filter that follows a function call:
{{ _("test")|upper }}keeps its shape. - Handlebars sections such as
{{#if}}are no longer taken for the start of a Jinja comment, which left everything up to the next#}unformatted. - Jinja’s
+whitespace control marker is read wherever-is, so{%+ if x %}counts as a block tag,T038no longer misreports these blocks and the formatter indents them. - A
{%that opens nothing no longer hides the markup after it: a page quoting template syntax in prose, as in<code>{%-</code>, is formatted rather than skipped down to the next%}. {%written inside javascript is no longer read as a template tag; a<script>holding'{%'and'%}'in its code used to leave its whole line unformatted.- A template block opened and closed on one line no longer indents everything after it, and tags beyond the built in set, such as
{% language 'de' %}text{% endlanguage %}, are recognised as balanced on a line too. - Extra spaces between attributes no longer count towards a tag’s length:
<input id="a" type="checkbox">used to flip between spread and joined on every run. - Formatting a file twice gives the same result when a
<script>or<style>is followed by text. Text sitting directly against the element, as ina<script>x</script>b, is still left alone, since a line break there would render as a space. - Indentation is kept for an element opened on the same line as a
<script>,<style>or<pre>, so the children of<a class="x">text<style>now sit inside it, and a closing tag written after the block’s end tag gives back the level it took. - A
<pre>,<textarea>,<script>or<style>opened and closed on one line no longer cancels a block opened earlier:<pre>x</pre><script>left the script’s body indented as markup, and took a second run to settle. - Text inside
<pre>and<textarea>that looks like a djLint marker, such as{# djlint:on #}shown as sample code, no longer ends the verbatim block and walks its contents a level further right on every run. - Repeated formatting with
--preserve-leading-spaceno longer moves a line further right on every run, as it did for a multi-line{# ... #}comment and every other line inside an indented block. --preserve-leading-spaceno longer keeps a blank line on one run and drops it on the next when a<pre>or<textarea>is written with leading indentation;--blank-line-after-taghad the same drift from the second tag in its list onwards.- With
--preserve-leading-space, the contents of a{{ if }}or{{ range }}block no longer lose an indent level when an already formatted go template is formatted again. --blank-line-before-tagno longer splits a line to place its blank line, so a tag written after other content, such as the{% block %}inside a one line{% set %}...{% endset %}, stays where it is.--blank-line-before-tagno longer inserts a blank line into an attribute value, which grew the file on every run.--blank-line-after-tagalready left attributes alone.- A
djlint:offblock placed between a tag’s attributes no longer crashes the formatter when it contains a backslash, and its text comes back exactly as written. - On free-threaded Python,
--format-cssand--format-jsno longer indent a<style>or<script>body by the wrong amount when several files are formatted at once. djlint - --reformat --lintno longer writes its report into the file: the lint findings, the--statisticsblock and the--github-outputannotations go to stderr when stdout is carrying the formatted code. A lint-only run is unchanged.--github-outputannotations no longer land in the file either: in CI, where the flag turns itself on from$GITHUB_ACTIONS,cat f.html | djlint - --reformat > f.htmlwrote::warninglines intof.html.--statisticsprints its summary alongside GitHub annotations. It was dropped whenever the GitHub output was on, which happens by itself in a workflow.- Line endings survive
djlint -: a CRLF buffer piped to--reformatcame back LF throughout. Input that--require-pragmaskips is handed back byte for byte. - U+2028, U+2029, U+0085, form feed and vertical tab are no longer treated as line breaks; one inside a
<script>string was rewritten as a newline and broke the script. - Console output is utf-8 on stdout and stderr alike, so a warning no longer reaches a Windows console as
\U0001f622rather than an emoji. - Input on stdin that is not valid utf-8 is reported as bad input rather than as a djLint failure.
- A closed pipe, as in
djlint . | head -1, is no longer a failure: it printed a traceback and exited120. - A file reached through more than one of the given paths, as in
djlint . templates/, is checked once, so it is no longer reported and counted twice or written twice under--reformat. - A trailing or empty entry in
custom_blocks,ignore_blocks,custom_html,blank_line_after_tagorblank_line_before_tag, as inignore_blocks = "raw,", is ignored instead of turning off template indentation altogether or padding every template tag in the file. .gitignoreis read only when--use-gitignoreoruse_gitignoreasks for it, so a line djLint cannot parse, such as one ending in a backslash, no longer aborts every run in the project with a traceback.--require-pragmaskips a file whose first line it cannot decode instead of aborting the whole run. A file that is checked and turns out undecodable is still reported as a failure.--indent-jsand--indent-cssoverride the indent alone, leaving other beautifier settings in the config file’sjsorcssblock, such aswrap_line_length, in place.--ignoreand--includeaccept a space after the comma, so--ignore "H011, H013"no longer reportsH013.
Performance
Section titled “Performance”- Linting a large file is many times faster: a 120KB page went from 13 seconds to 0.15, and a 1.7MB run of 60 files from 28 seconds to 1.6. Linting a file with many findings is several times faster too.
- Formatting is about a quarter faster, for around a tenth of a megabyte more memory: 575 templates from a large Django project took 2.6 seconds of processor time under 1.44.2 and take 1.9 now.
- The
H026page no longer claims an emptyclassoridcannot be targeted: an attribute presence selector such asdiv[class]does match one, so removing the attribute can change how a page is styled. - The GitHub Actions integration is documented: djLint annotates a pull request’s diff with findings by itself, and
--github-output/--no-github-outputoverride that. --allow-empty-inputappears in the command line reference, which had been missing it.H042is no longer documented as off by default, which it stopped being in 1.42.1.- The before-and-after example on the formatter page has been corrected: it showed a template tag with single quotes, which the formatter rewrites now that
T002is on by default. - Code samples on the site are highlighted in full again, after attribute names, punctuation and other tokens had lost their colours.
- The playground tells a browser without web workers that it needs one, instead of failing first.
[1.44.2] - 2026-08-08
Section titled “[1.44.2] - 2026-08-08”H037no longer reports two attributes whose names differ only before a.as duplicates (data-a.checkedanddata-b.checked, or alpine’sx-on:click.preventandx-on:keyup.prevent).- An attribute whose name merely ends in the name a rule looks for is no longer mistaken for it.
data-altanddata-x.altleftH013silent on an image with noalt,data-langandxml:langsilencedH005,data-heightanddata-widthsilencedH006,data-name="description"silencedH030anddata-name="keywords"silencedH031, anddata-x.idsatisfied a<label for>forH042. - A name written inside an attribute value is no longer read as an attribute.
title="alt=x"leftH013silent,class="language-en"silencedH005, andtitle="the ID=5"was reported byH010as an uppercase attribute name. H005no longer reports a tag whose name only starts withhtml, such as<htmlx>, and points at the<html>tag itself rather than at everything up to the last>in the file.
[1.44.1] - 2026-08-07
Section titled “[1.44.1] - 2026-08-07”- Formatting no longer changes what the page renders. A space that shows was dropped (
<span>a</span><span> b </span>rendered asab,a{% if x %} b {% endif %}casabc), a space that shows nothing was added (<span> </span>became<span> </span>), and moving a tag onto its own line could add one (x<img>y, or across a comment as ina{# c #}<img>). Whitespace is now kept where it renders and dropped where it does not. - A line break inside an attribute value is kept, so a
titletooltip no longer loses a line and adata-value read by script no longer comes back different. Line breaks inclass,style,srcsetandsizesmean nothing and are still joined. - Indentation inside
<pre>and<textarea>is left alone when the closing tag has something after it on its line (<pre> a\n b</pre> tail). - Whitespace css does not collapse, such as U+2005, is text, and is no longer stripped from the edges of an element or of the file.
- Two indenting fixes: a line that closes one tag and opens another (
</b><i>) indents its contents again, and a line that closes more tags than it opens unindents even when a whole tag ends it (</b><small></small>). Both left the lines after them at the wrong level. --line-break-after-multiline-tagnow applies only to tags actually written over several lines, as its help says. It was holding back the content of every element, splitting tags that fit on one line.- A
classvalue is tidied wherever it was written:class=" a b "becomesclass="a b". A tag whose attribute value holds a line break is spread over lines, since it cannot fit on one.
[1.44.0] - 2026-08-04
Section titled “[1.44.0] - 2026-08-04”Feature
Section titled “Feature”- New
--allow-empty-inputoption, and the matchingallow_empty_inputconfig key, exits0instead of2when the given paths match no files.
- An html close tag inside an inline
{% if %}...{% endif %}no longer dedents everything that follows it by one level, collapsing nested structures toward column 0 - a regression in 1.43.0. A close tag already at the content level of the template block it sits in is held there, but the level it was denied was then taken off the end of the line instead, so{% if r %}</strong>{% endif %}moved the rest of the block left. The matching open tag never took a level to give back, since{% endif %}had already returned it. - A run where every file found was skipped by
exclude,extend_exclude,use_gitignoreorrequire_pragmanow exits0instead of1. Skipping them is the configuration doing its job, and it is what letsexcludework under pre-commit, which passes the names of every staged file. Paths that match no files at all now exit2rather than1, so exit1means only that djLint found something to report. - An unhandled error exits
2instead of1, so a crash is no longer indistinguishable from a lint error. The traceback is still printed. - An unrecognized
--profile, orprofilein a config file, is now a usage error. A typo used to lint with a silently different rule set and exit0, and raisedKeyErrorwith--require-pragma. - A directory whose name matches the file extension (
build.html/) is no longer picked up as a template and opened as a file, crashing the run. No files to check!is written to stderr instead of stdout, where formatted code is written.- Input piped to
djlint - --reformatthat--require-pragmaskips is handed back byte for byte instead of being replaced byNo files to check!.
[1.43.2] - 2026-08-01
Section titled “[1.43.2] - 2026-08-01”blank_line_before_tagno longer inserts a blank line when the previous line opens a block and increases the indentation, e.g. between<div>and{% block %}. Since 1.41.0blank_line_after_taghas left the closing edge of a block alone ({% endblock %}before</div>), while the opening edge kept its padding, so a template using both options came out lopsided.
[1.43.1] - 2026-07-28
Section titled “[1.43.1] - 2026-07-28”H025no longer reports the closing tag of a multi-line<script>or<style>as an orphan - a regression in 1.43.0. A genuinely unmatched</script>is still reported.
[1.43.0] - 2026-07-27
Section titled “[1.43.0] - 2026-07-27”Feature
Section titled “Feature”- New
--stdin-filenameoption gives content piped in on stdin (djlint -) its real path, soper-file-ignoresmatches against that name and linter messages report it. Per-file ignores were previously dead for piped input, since nothing matches the name-. Path separators are normalized as they are for files on disk.
- An apostrophe inside a template tag nested in an attribute value (
title="{% translate "You don't have permission" %}") no longer swallows the rest of the document, which madeH025report every enclosing element as an orphan. A template tag in a value is now skipped whole unless it holds a>, so a quoted literal likea="{{"is still left alone. - A line that starts with a closing tag and ends with a whole tag (
</span>tail<textarea>y</textarea>) unindents again; everything after it stayed one level too deep. - A template block tag followed by a whole html tag on the same line (
{% endif %} <td class="x">y</td>) indents as a block tag again, so{% endif %}unindents and{% else %}aligns with its{% if %}. A line only takes that shape once the tag fits on one line, so reformatting an already formatted file moved it. - A tag opened after the end of a verbatim block on the same line (
</pre> <span>x) is tracked again; its closing tag took a level from a tag opened before the block, dedenting that tag’s siblings. - A template control block written across lines is kept that way when it opens against a tag (
<div>{% if x %}), and the choice is no longer applied to the wrong block. Blocks were paired with the source by position, which does not line up with the expanded html; they are now matched by tag and contents. - A tag whose
style,srcset,data-srcsetorsizesvalue was written over several lines is no longer spread over multiple lines and pulled back together on the next run.max_attribute_lengthis now measured against what is written out, not against padding that the rewrite drops. - A
<pre>or<textarea>opened on a line that also holds a self-contained comment (<pre>x<!--c-->) is recognized as opening a verbatim block again. Its contents were re-indented instead of left alone, and the closing</pre>gained an indent level on every run - unbounded whitespace growth inside preformatted text. - A closing tag that starts its line no longer dedents when the tag it closes was opened after text on an earlier line (
text <b>bold/</b> tail). The loss accumulated, so a document repeating that shape drifted further left with each occurrence. A closing tag with nothing to pair against still dedents as before. - A
<inside a one-line<script>,<style>,<textarea>or<title>no longer counts as a tag when indenting.<script>var a = '<span>'</script>left a phantom open<span>on the tag stack, leaving everything after it one level too deep. - An inline element that opens after text on its line and closes on a later line no longer dedents everything that follows it by one level (
text <b>bold/more</b> tailinside a<p>) - a regression in 1.40.8. The wrong output was idempotent, so it survived later runs. - A Go template comment
{{/* ... */}}is no longer read as a block close tag. It starts with{{/, the handlebars block-close prefix, so it popped a block off the stack:H037reportedDuplicate attribute found.for mutually exclusive attributes such as<a {{if .A}}href="a"{{else}}{{/* c */}}href="b"{{end}}>, and the formatter unindented the rest of the block. A comment renders as nothing, soH037no longer treats one as a template-generated attribute name prefix either. - A tag that merely touches an ignored block is no longer treated as being inside it. A tag ending exactly where an ignored block starts - such as
{% if x %}{# comment #}- was skipped by the linter, most visibly makingT038reportEnd tag has no matching block tagfor a balanced{% if %}. Affects every rule that skips ignored blocks (H025,H037,H041,H042,T002,T003,T027,T038,T039) and every kind of ignored block. - A bare
djlint:offpragma no longer ignores the tag written immediately before it.<img>{# djlint:off #}silently dropped every error on that<img>, while<img>{# djlint:off H013 #}correctly reported it - a pragma covers what follows it, not what precedes it.
[1.42.3] - 2026-07-23
Section titled “[1.42.3] - 2026-07-23”- Attribute names containing punctuation beyond
-,.,:,@and*no longer stop a tag from being wrapped over multiple lines. The attribute parser now accepts any character HTML allows in an attribute name, so Alpine key modifiers (@keydown.prevent.?), Angular bindings ((click),[disabled]) and Vue shorthands (#slot) are formatted like every other attribute instead of leaving the whole tag on one long line. Angular bindings also reach--format-attribute-js-jsonfor the first time, which already listed them. - An unquoted attribute value with a template tag glued to the rest of the value (e.g.
src={{ MEDIA_URL }}/logo.png,href={{ .Permalink }}#{{ .Anchor }}) is no longer split into a truncated value plus a bogus standalone attribute when attributes are wrapped; it stays one value, quoted when spread.
[1.42.2] - 2026-07-22
Section titled “[1.42.2] - 2026-07-22”- Attributes containing
${...}inside a quoted value (e.g. JS template literals like:name="`x[${i}]`") respectmax_attribute_lengthagain and are spread over multiple lines - a regression in 1.40.6. Unquoted Mako-style${...}expressions in tags are still left unformatted. - A stray
<!--that is not a real HTML comment (for example inside a{# ... #}template comment or inside a<textarea>/<pre>) no longer swallows the rest of the document. This fixes falseH025orphan-tag reports and over-indentation of the tags that follow - a regression in 1.40.6. - Handlebars triple-stache
{{{ ... }}}and raw-block{{{{ ... }}}}expressions used as tag attributes are tokenized correctly again, fixing falseH025orphan-tag reports - a regression in 1.40.6. - A quoted literal brace in an attribute value (e.g.
data-x="{{") no longer makes the tokenizer scan into later content looking for a matching}}, which could collapse<pre>/<textarea>whitespace - a regression in 1.40.6. - Spacing the
}}of a handlebars{{#if}}/{{#each}}block-open tag is now idempotent; it no longer leaks a trailing space into the following{{...}}tag on later formatting passes. T038no longer reports block tags that appear only inside a handlebars comment ({{!-- ... --}},{{! ... }}) or inside a handlebars raw block ({{{{raw}}}} ... {{{{/raw}}}}).T039no longer reports handlebars raw-block delimiters ({{{{raw}}}}/{{{{/raw}}}}) as unclosed template tags.- Malformed tag attributes that the attribute parser cannot fully parse (e.g. a stray
<or dangling=) are now left untouched instead of having the unparsable characters silently dropped when attributes are wrapped. - A
<used as a less-than operator inside a template expression in text or<script>content (e.g.${a<b},{{a<b}}) is no longer mistaken for an HTML tag start, which could merge or drop following content and break idempotency - a regression in 1.40.6. - Unquoted attribute values containing
:or/(e.g.href=https://example.com/page) are no longer split into a truncated value plus a bogus standalone attribute when attributes are wrapped - a regression in 1.40.6. - A nameless
="value"attribute is no longer rewritten with the literal attribute nameNone; malformed attributes are left untouched. - Trailing whitespace inside an indented
<textarea>/<pre>is preserved instead of being collapsed by whitespace cleanup (it is verbatim content).
Performance
Section titled “Performance”- Detecting ignored/verbatim blocks (
{% comment %},{% blocktrans %},{% filter %},<pre>,<script>, etc.) is dramatically faster on templates with many{% ... %}tags. A lazy[ ]*?before the block keywords caused pathological backtracking; the equivalent greedy[ ]*removes it, cutting reformat time on large template-heavy files by roughly 5x.
[1.42.1] - 2026-07-20
Section titled “[1.42.1] - 2026-07-20”- H017 and H018 no longer style
command,keygenandmenuitem- elements that were removed from the HTML standard. - Enabling H018 together with H017 or H035 now prints a warning when linting - they enforce opposite void tag conventions, so only one should be on.
Changed
Section titled “Changed”Linter rule defaults were reviewed against a simple bar: on by default means correctness, security, clear accessibility, or a consistency check the formatter also enforces - with near-zero false positives. Four rules moved to opt-in (--include=...):
- T003 (endblock names): neither Django nor Jinja requires a name on
{% endblock %}; the name demand is a style preference. The correctness checks T003 used to bundle - unclosed{% block %}, orphan{% endblock %}and mismatched endblock names, all hard template errors - moved into T038, which stays on by default, so nothing real is lost when T003 is off. - T002 (double quotes in tags): engines accept both quote styles, no autofix exists, and quote-style rules are the canonical example of style checks that don’t belong in a default tier.
- H006 (img width/height): valuable performance advice (browsers map the attributes to a default
aspect-ratio, preventing layout shift) but performance rather than correctness, and the dimensions are frequently unknowable in a template - user uploads, CMS urls, art-directed<picture>sources - so the rule demands data the author may not have. - H031 (meta keywords): major search engines have ignored keyword metadata for over a decade; recommending that it be added is outdated advice. The niche intranet-indexer use case keeps the rule available via
--include=H031. - H042 (label/for) moved the other way - from opt-in to on by default - after its false-positive class was removed: the rule now checks a file only when nothing in it could render an id invisibly. Any
{{ ... }}output (form widgets),{% include %}/{% extends %}or unrecognized template tag silences the rule for that file, so where it does run, every report is a genuinely broken label association (a WCAG 1.3.1/4.1.2 failure the W3C validator also treats as an error).
[1.42.0] - 2026-07-20
Section titled “[1.42.0] - 2026-07-20”Feature
Section titled “Feature”Template languages:
- New
askamaprofile for Askama (jinja-style templates in Rust). Rust expressions are never reformatted: function and{% set %}/{% let %}formatting are disabled sosome_macro!("foo")?, char literals'a'and tuples keep their exact spelling, and string quotes are never rewritten. The Flask-specificurl_forrules (J004/J018) don’t apply. - New
teraprofile for Tera (Rust, used by Zola): jinja-style formatting plus Tera v2{% component %}/{% endcomponent %}blocks and single-tag{% set_global %}. The Flask-specificurl_forrules don’t apply. MiniJinja needs no profile of its own - it is fully Jinja2-compatible, use--profile=jinja. - New
liquidprofile for Liquid (Shopify themes, Jekyll, Eleventy, the Rustliquidcrate).{% case %}/{% when %},{% capture %},{% tablerow %},{% form %},{% paginate %},{% highlight %}and{% unless %}/{% elsif %}indent correctly,{%- -%}whitespace control is handled, and the bodies of Shopify section tags ({% schema %},{% style %},{% javascript %},{% stylesheet %}) are left untouched - they contain JSON, CSS or JS rather than html. - The
golangprofile now indents template blocks:{{ if }},{{ range }},{{ with }},{{ block }}and{{ define }}indent their contents up to the matching{{ end }}, with{{ else }}/{{ else if }}as branches and the{{- -}}whitespace-control forms included. Blocks opened and closed on one line are left alone; single tags like{{ template }}and lookalike variables such as{{ .end }}are unaffected.
New linter rules:
- T040:
{% extends %}or{% include %}with a missing or empty template name - an error the engine only raises at render time, so the typo is easy to ship. - H041: an html tag opened in one
{% block %}and closed in a different one. The pair looks balanced in the file, but a child template overriding either block renders unbalanced html. - H018 (off by default, enable with
--include=H018): void tags closed with/>instead of>, e.g.<br/>- the trailing slash has no effect in HTML. The opposite convention of the optional H017 (“void tags should be self closing”); enable one or the other, not both. - H042 (off by default, enable with
--include=H042): a<label for="...">whose value matches no elementidin the same file. Template-generated values are skipped; the rule is opt-in because inputs rendered by e.g.{{ form.email }}carry ids the linter cannot see.
Configuration:
indentandmax_line_lengthnow fall back toindent_sizeandmax_line_lengthfrom a.editorconfigat the project root. The command line and djlint config files still take precedence, and only sections applying to html (or the configuredextension) are read.
Documentation:
- Every linter rule now has a detailed entry on the linter page - what it checks, why it matters, and a verified Don’t/Do example pair - in English, French, Russian and Chinese. Askama, Tera and Liquid get language pages, logos and homepage cards, and engines covered by existing profiles (MiniJinja, Jinjava, Pebble, the Liquid dialects) are noted on the pages of the profiles that cover them.
- H017 no longer misfires on tags that merely start with a void tag name:
<cola>(matched by a brokencolgroupexclusion) and custom elements like<img-icon>are no longer reported.<meta>tags, missing from the rule’s void tag list, are now reported.
[1.41.0] - 2026-07-19
Section titled “[1.41.0] - 2026-07-19”Feature
Section titled “Feature”- New rule T038: block template tags with no matching end tag are now reported:
{% if %}without{% endif %}, handlebars{{#if}}without{{/if}}, end tags with no opening tag, and crossed blocks like{% if %}{% for %}{% endif %}. Tags fromcustom_blocksare checked too;{% block %}/{% endblock %}pairs stay covered by T003. - New rule T039: template tags that never reach their closing delimiter are now reported, e.g.
{% url 'x" user.url }}(closed by}}instead of%}),{{ user.name }(missing a brace), or a tag cut off by the next tag or the end of the file. Complements T027 (unclosed string in a complete tag) and T034 (}%typo), which keep reporting their own cases. - New
--rules FILECLI option: load a custom rules file in.djlint_rules.yamlformat from any path, instead of only next topyproject.toml.
Changed
Section titled “Changed”- The formatter now condenses runs of extra whitespace inside single-line template tags to a single space, e.g.
{% if abc == 101 %}becomes{% if abc == 101 %}. This fixes what rule T032 reports, so the linter and formatter no longer conflict. Whitespace inside string literals is preserved, including strings with backslash-escaped quotes; multiline tags, ignored blocks, the literal contents of{% verbatim %}/{% raw %}and the handlebars/golang profiles are untouched. - The default
excludelist is now tailored to djLint instead of copying ruff/black. Added directories that hold generated or third-party HTML:htmlcov(coverage.py reports),site-packages(installed packages’ templates such as Django admin and DRF, matched in any virtualenv layout) and_site(Jekyll/Eleventy output). Removed Python tool caches and editor config that never contain HTML:.ipynb_checkpoints,.mypy_cache,.pytest_cache,.pytype,.ruff_cache,.pants.d,.vscodeandbuck-out.
Formatter indentation:
- Closing a template block now restores the indentation of its opening tag, so HTML tags left unclosed inside the block (e.g. a wrapper
<div>rendered by{% if %}...{% endif %}and closed by a later conditional) no longer shift the indentation of everything after it. When every branch of an{% if %}/{% elif %}/{% else %}shifts the depth equally, e.g. a<tr>opened in both branches, the shift is kept after{% endif %}. - Template tags and expressions spanning multiple lines keep the relative indentation of their contents instead of flattening every line to the tag’s level. Nested objects and arrays in e.g.
{% story ... with { ... } %},{% include ... with { ... } %}and non-JSON{{ func(...) }}calls are now indented by bracket depth. {% endtrans %}(Jinja/Twig block{% trans %}) no longer decreases the indentation level, which shifted the{% endtrans %}line and everything after it one level to the left.- Multiline
{% set %}objects nested inside HTML elements are no longer over-indented in proportion to their nesting depth. - Self-closing custom block tags (django-components syntax, e.g.
{% component "calendar" date="2015-06-19" / %}withcustom_blocks = "component") no longer indent the lines that follow them as if a block had been opened.
Formatter line breaks and spacing:
- A single-line block-form
{% set x %}...{% endset %}is no longer expanded onto multiple lines. The block captures its content verbatim, so the added whitespace changed the value of the variable. Authored multi-line set blocks are still indented as before. - In multi-line
{{ ... }}function calls, a call passed as an argument no longer causes a stray space before the following comma, and the arguments after it keep the same indentation as the other arguments. blank_line_after_tagno longer inserts a blank line when the next line closes a block and decreases the indentation, e.g. between{% endblock %}and</div>.blank_line_before_tagnow inserts the blank line above a comment directly preceding the tag, keeping the comment attached to the tag it documents.
Linter:
- H020 no longer reports
<slot></slot>: an empty slot element is the standard way to declare a default slot outlet. - H025 no longer reports a tag as an orphan when the same tag is opened in each branch of an
{% if %}/{% else %}and closed once outside it (and vice versa for close tags), since only one branch renders. - H025 now reports mis-nested tags whose close tag crosses another open tag, e.g.
<b>in<h1>blah <b>bold</h1>. - T003 no longer requires an endblock name when
{% endblock %}is on the same line as its{% block ... %}, e.g.{% block title %}{% endblock %}. The formatter keeps such blocks on one line, so the linter and formatter no longer conflict. - Linter rules no longer report errors for the literal contents of
{% verbatim %}…{% endverbatim %}blocks, matching the existing treatment of jinja{% raw %}blocks.
Configuration:
- Comma-separated options in config files (
ignore,include,custom_blocks,custom_html,exclude,extend_exclude,ignore_blocks,blank_line_after_tag,blank_line_before_tag) can now also be given as lists, e.g.ignore = ["H017", "H031"]inpyproject.toml; previously list values were silently ignored. --max-blank-linesgiven on the command line is no longer overridden by the config file, matching all other options.
[1.40.10] - 2026-07-19
Section titled “[1.40.10] - 2026-07-19”- Fix crashes in mypyc-compiled wheels:
AttributeError: attribute 'reformat' of 'Config' objects is not writablewhen linting or formatting multiple files, andAttributeError: attribute 'start' of 'TagToken' objects is not writablewhen processing a file.
[1.40.9] - 2026-07-18
Section titled “[1.40.9] - 2026-07-18”- Indent content inside Django
{% cache %},{% timezone %},{% localtime %}and{% localize %}blocks instead of dedenting everything after them. - Format django-cotton component tags such as
<c-card>and<c-forms.input />as block HTML tags without requiringcustom_htmlconfiguration. - Preserve whitespace-only content of inline elements as a single space instead of dropping it, so runs like
<b>bold</b><span> </span><i>italic</i>keep rendering a space; non-collapsible whitespace such as U+2005 is kept verbatim. - Preserve line breaks inside hyperscript
_attribute values, where a newline separates commands and--comments run to the end of the line. - Stop inserting line breaks into attribute values that render whitespace verbatim; only
classandstylevalues are spread over multiple lines withformat_attribute_template_tags. - Leave
{% comment %}block content untouched when reformatting, e.g. bare URLs ending in/>. - Apply rule-specific
djlint:off RULEsuppression to any finding overlapping the region, so reformatted guards keep linting clean. - Avoid false H037 reports for attribute names with a conditional template prefix, e.g.
{% if x %}data-{% endif %}srcset. - Avoid false reports for HTML-like content inside template tag arguments, e.g. H008 on quotes in a string argument.
[1.40.8] - 2026-07-17
Section titled “[1.40.8] - 2026-07-17”- Preserve conditional attribute names and significant whitespace in template-generated attributes.
- Keep parent closing tags aligned after multiline inline content.
- Avoid false H026 reports when
idorclassis followed by a spaced equals sign. - Keep short tag contents inline when attributes contain template expressions.
- Avoid false D018/J018 reports for links using valid URI schemes.
- Indent content inside Twig
embedblocks. - Avoid false H037 reports for attributes in mutually exclusive template branches.
- Respect
excludeandextend_excludefor explicitly provided files. - Preserve attributes containing nested template blocks when wrapping long tags.
- Preserve template expressions used in dynamic HTML tag names.
- Preserve asterisks in HTML attribute names such as htmx response targets.
- Avoid adding trailing whitespace after function calls in multiline template expressions.
- Avoid false T002 reports for template tags inside HTML attributes.
[1.40.7] - 2026-07-15
Section titled “[1.40.7] - 2026-07-15”- Preserve URLs enclosed in angle brackets inside template comments.
[1.40.6] - 2026-07-13
Section titled “[1.40.6] - 2026-07-13”Performance and refactoring
Section titled “Performance and refactoring”- Replace repeated HTML regex scans with tokenization.
[1.40.5] - 2026-07-12
Section titled “[1.40.5] - 2026-07-12”- Avoid false H037 reports when attribute names appear inside quoted values or other attribute names.
- Preserve template expressions in HTML attribute names when wrapping attributes.
- Preserve indentation after void tags containing markup in quoted attributes.
[1.40.4] - 2026-07-07
Section titled “[1.40.4] - 2026-07-07”- Keep Jinja comments and set tags idempotently indented with
preserve_leading_space. - Avoid false H026 reports when
idappears inside quoted attribute values. - Avoid false D018/J018 reports for
actionparameters inside quoted template URL helper attributes. - Report H007 when leading template tags appear before an HTML tag without a preceding doctype.
- Keep
blank_line_after_tagfrom inserting blank lines inside multiline HTML attribute values, preserving idempotent reformatting for embedded template tags. - Report T003 when
{% endblock name %}does not match its opening{% block name %}. - Report H025 when list tags are nested inside
<p>tags.
[1.40.3] - 2026-07-04
Section titled “[1.40.3] - 2026-07-04”- Preserve
djlint:offblocks inside tag attributes and avoid false H025 orphan reports when a matching tag crosses adjlint:offblock boundary. - Keep repeated single-line Django
{% if %}blocks idempotent after one reformat pass.
[1.40.2] - 2026-07-03
Section titled “[1.40.2] - 2026-07-03”- Keep multiline inline-tag indentation when an inline child appears before following text.
[1.40.1] - 2026-07-01
Section titled “[1.40.1] - 2026-07-01”- Preserve full
djlint:offblocks before formatter passes so ignored template, script, and style content is not rewritten. - Preserve inline template blocks embedded in rendered text or captured content so formatting does not add meaningful whitespace or misalign following content.
- Keep chained Jinja function calls and lookups intact when formatting template expressions.
- Preserve whitespace-sensitive Django
filterblocks instead of moving punctuation or translated text around them. - Keep Jinja/Nunjucks-trimmed
<textarea>closing tags aligned without reformatting untrimmed textarea contents.
[1.40.0] - 2026-07-01
Section titled “[1.40.0] - 2026-07-01”Feature
Section titled “Feature”- Add
single_attribute_per_lineto wrap attributes in a Prettier-like layout using the configured indent.
[1.39.7] - 2026-06-30
Section titled “[1.39.7] - 2026-06-30”- Preserve Jinja template comments inside formatted
<script>and<style>blocks.
[1.39.6] - 2026-06-30
Section titled “[1.39.6] - 2026-06-30”- Avoid false H025 reports for HTML-like strings inside template tags.
- Preserve Jinja template tags inside formatted
<script>and<style>blocks.
Packaging
Section titled “Packaging”- Revise the minimum required dependency versions:
- click raised from 8.0.1 to 8.2.0
- cssbeautifier lowered from 1.14.4 to 1.13.0
- jsbeautifier lowered from 1.14.4 to 1.13.0
- json5 raised from 0.9.11 to 0.10.0
- pathspec lowered from 0.12 to 0.9.0
- pyyaml lowered from 6 to 5.1
- regex lowered from 2023 to 2021.8.21
- tomli is lowered from 2.0.1 to 0.2.0
[1.39.5] - 2026-06-29
Section titled “[1.39.5] - 2026-06-29”- Return 1 when no files match the requested lint or format run.
- Make
--check -return 1 when formatting changes are needed. - Keep progress output off stdin runs.
Performance
Section titled “Performance”- Defer runtime-only imports until the CLI code paths that need them.
- Process stdin formatting in memory instead of creating a temporary file.
- Avoid creating an executor when a run only has one worker.
[1.39.4] - 2026-06-24
Section titled “[1.39.4] - 2026-06-24”- Fix crashes in mypyc-compiled wheels.
[1.39.3] - 2026-06-23
Section titled “[1.39.3] - 2026-06-23”- Use Click instead of tqdm for progress output, send progress to stderr, respect
--quiet, and honorNO_COLOR. Remove directcoloramaandtqdmdependencies now that Click handles CLI colors and progress. - Avoid false H025 reports after self-closing tags in Django templates.
- Avoid false H025 reports for multiline Go template attributes.
- Keep Django child-template reformatting idempotent when inline control blocks also appear inside HTML attributes.
- Respect whitespace-control dashes when applying
blank_line_after_tagandblank_line_before_tag.
[1.39.2] - 2026-06-11
Section titled “[1.39.2] - 2026-06-11”v1.39.1 was not published due to mypyc compilation error.
Packaging
Section titled “Packaging”- Fix mypyc compilation.
[1.39.1] - 2026-06-11
Section titled “[1.39.1] - 2026-06-11”- Avoid false T027 reports for apostrophes inside quoted template strings.
- Format Alpine.js object methods in attributes when
format_attribute_js_jsonis enabled. - Preserve indentation after inline Jinja control-flow blocks that start with whitespace trim markers, such as
{%- if ... %}...{% endif %}. - Preserve safe inner quote style for Jinja function calls inside quoted HTML attributes.
[1.39.0] - 2026-06-05
Section titled “[1.39.0] - 2026-06-05”Feature
Section titled “Feature”- Add
preserve_class_newlines/--preserve-class-newlinesto keep authored line breaks inside multilineclassattributes.
- Fix Django 6.0
{% partialdef %}block indentation so{% endpartialdef %}aligns with its opener. - Preserve multiline Django/Jinja control-flow blocks instead of condensing short bodies onto one line.
- Preserve single-line inline HTML and template tag bodies during expansion, even when they exceed
max_line_length.
[1.38.2] - 2026-06-05
Section titled “[1.38.2] - 2026-06-05”- Fix
python -m djlintnot working due to mypyc compilation.
[1.38.1] - 2026-06-04
Section titled “[1.38.1] - 2026-06-04”- Match exclude paths on path boundaries.
[1.38.0] - 2026-06-04
Section titled “[1.38.0] - 2026-06-04”Feature
Section titled “Feature”- Add support for
.djlint.tomlproject and global config files.
- Preserve single-line inline HTML tag bodies when they fit within
max_line_length. - Avoid evaluating template expressions while formatting tag contents.
Packaging
Section titled “Packaging”- Fix npm publish workflow.
[1.37.0] - 2026-06-04
Section titled “[1.37.0] - 2026-06-04”Feature
Section titled “Feature”- Add
--format-attribute-js-jsonfor formatting JavaScript and JSON inside HTML attributes. It also supportsformat_attribute_js_json_patternandformat_attribute_js_json_min_propsfor tuning which attributes are formatted. Thanks, @oliverhaas. - Add
--github-outputfor GitHub Actions annotations. Thanks, @iloveitaly.
- Fix
ignore_blocksmatching when ignored blocks are indented. Thanks, @tdryer. - Use relative paths for
--excludeand--use-gitignorematching so path filters work consistently from nested directories. Thanks, @satya-waylit. - Stop D018/J018 from flagging root links such as
href="/". Thanks, @SAY-5. - Do not treat soft hyphen entities as text for H023. Thanks, @kotutuloro.
- Fix Handlebars
{{#unless}}indentation. Thanks, @S1mplePixels. - Fix formatting when
/>appears inside an HTML attribute value. Thanks, @novucs. - Improve CPU count handling for worker setup.
Performance
Section titled “Performance”- Improve formatter caching and reduce cache memory usage. Formatting is about 19% faster.
Documentation
Section titled “Documentation”- Add Chinese translation. Thanks, @Twisuki.
- Add Homebrew installation instructions. Thanks, @alfawal.
- Add EFM Neovim integration documentation. Thanks, @danielebra.
- Add copy-pastable pre-commit YAML to the README. Thanks, @Pierre-Sassoulas.
- Polish linter and CLI documentation. Thanks, @jasonaowen and @dotWee.
Packaging
Section titled “Packaging”- Drop Python 3.9 support.
[1.36.4] - 2024-12-24
Section titled “[1.36.4] - 2024-12-24”- Fix specific mixture of quotes and escaped quotes (e.g. in a json string in an html attribute) breaks the html. Thanks, @oliverhaas.
- Fix broken formatting of template tags inside template tags. Thanks, @oliverhass.
[1.36.3] - 2024-11-29
Section titled “[1.36.3] - 2024-11-29”This release reverts the following changes from the last release as they caused issues:
- Fix specific mixture of quotes and escaped quotes (e.g. in a json string in an html attribute) breaks the html. Issue #1048.
- Resolve exclude paths. Issue #1047.
[1.36.2] - 2024-11-28
Section titled “[1.36.2] - 2024-11-28”Fix:
- Fix specific mixture of quotes and escaped quotes (e.g. in a json string in an html attribute) breaks the html. Thanks, @oliverhaas.
- Resolve exclude paths. Thanks, @antoineauger.
Performance:
- Minor regex indent optimization. Thanks, @oliverhaas.
[1.36.1] - 2024-11-07
Section titled “[1.36.1] - 2024-11-07”- Improve performance by ~30%. Thanks, @oliverhaas.
[1.36.0] - 2024-11-05
Section titled “[1.36.0] - 2024-11-05”Feature
Section titled “Feature”- Add support for
djlint.tomlconfig file. The format is identical topyproject.toml, but it does not use[tool.djlint]table.
- Do not format HTML in attributes. Thanks, @oliverhaas.
- Fix using
js_configinstead ofcss_config.
Performance
Section titled “Performance”- Increase performance by ~30% by using regex more efficiently and caching more stuff.
[1.35.4] - 2024-11-01
Section titled “[1.35.4] - 2024-11-01”Compiled mypyc wheels are now also available, which improve performance by ~21% over Pure Python. They will be automatically installed by your package manager when available for your platform. Pure Python wheel is still available.
Other changes have been made to improve performance, thanks to @JCWasmx86. See the commits for more details.
Formatting performance comparison with the previous version (tested on https://github.com/openedx/edx-platform with single thread):
| Version | Seconds |
|---|---|
| v1.35.3 | 20.39 |
| v1.35.4 pure Python | 14.39 |
| v1.35.4 compiled | 11.35 |
[1.35.3] - 2024-10-30
Section titled “[1.35.3] - 2024-10-30”This release significantly improves performance, especially for large files and large projects.
Formatting https://github.com/openedx/edx-platform took 87 seconds in the previous version, now it takes only 4 seconds (>2000% speedup)! Tested on a 32-core computer.
- Performance improved by caching some functions. Thanks to @JCWasmx86!
- Removed the limitation on the number of workers introduced in v1.35.0.
- Drop Python 3.8 support.
[1.35.2] - 2024-08-29
Section titled “[1.35.2] - 2024-08-29”- Fix npm publishing
[1.35.1] - 2024-08-29
Section titled “[1.35.1] - 2024-08-29”- Fix npm publishing
[1.35.0] - 2024-08-29
Section titled “[1.35.0] - 2024-08-29”- Unpin dependencies upper bounds.
- Use min(cpu_count, files_count, 4) workers. Use a thread instead of a process if only one worker will be used. This gives the best performance and low resource usage.
- Refactor the code.
- Fix max attribute length with longer regex custom html tags (#884)
- Fix Jinja formatting issues (#715)
- Fix: not detecting tabs as a valid seperation between tags (#813)
- Fix: Add ignore for sms links (#815)
- Fix: Allow attributes on
(#830)
[1.34.2] - 2024-08-28
Section titled “[1.34.2] - 2024-08-28”- max attribute length with longer regex custom html tags (#884)
[1.34.1] - 2023-12-20
Section titled “[1.34.1] - 2023-12-20”- formatter: Avoid rewriting the file if it has not been changed
- linter: fix missed H025 for double closing, closes #786
[1.34.0] - 2023-09-20
Section titled “[1.34.0] - 2023-09-20”- configuration: Fix formatting, unused import and forgotten print
Feature
Section titled “Feature”- configuration: Accept pyproject.toml as a —configuration argument
[1.33.0] - 2023-09-18
Section titled “[1.33.0] - 2023-09-18”- formatter: fixed extra breaks added around html tags inside template tags, closes #742
- formatter: fixed extra indend in script tags, closes #733
- formatter: fixed formatting on functions that used python keywords as the param name, closes #756
- h033: fix rull to not match data-action
- linter: fixed false positive on DJ018, closes #755
Feature
Section titled “Feature”- formatter: added support for nunjucks async loop tags
[1.32.1] - 2023-07-20
Section titled “[1.32.1] - 2023-07-20”[1.32.0] - 2023-07-19
Section titled “[1.32.0] - 2023-07-19”- formatter: fixed formatting on chained function, closes #704
- linter: fixed false positive on h026 data-id, closes #711
- linter: fixed golang false positive on T027, closes #712
Feature
Section titled “Feature”- formatter: added support for jazzband’s sorl-thumbnail tags, closes #714
[1.31.1] - 2023-06-26
Section titled “[1.31.1] - 2023-06-26”- formatter: fixed formatter formatting ignored code, closes #655
- formatter: fixed function formatting with nested quoted parenthesis, closes #698
- formatter: fixed overgrabbing on template tag condensing, closes #686
- formatter: function index was not formatted correctly, closes #693
[1.31.0] - 2023-06-12
Section titled “[1.31.0] - 2023-06-12”- formatter: fixed
line_break_after_multiline_tagto force break in all cases, closes #680 - formatter: fixed isolated quotes being deleted from attributes, closes #652
- formatter: fixed wild match on template tags, closes #686
- linter: fixed false positive on t001, closes #606
Feature
Section titled “Feature”- formatter: added
max-blank-linesflag to consolidate blank lines, closes #675 - formatter: added support for symphony forms, closes #476
[1.30.2] - 2023-06-02
Section titled “[1.30.2] - 2023-06-02”- formatter: added quotes to json keys, added option to disable set/function formatting, closes #682
[1.30.1] - 2023-06-02
Section titled “[1.30.1] - 2023-06-02”- linter: added missing positive on H021, closes #678
- linter: fixed false positive on H037, closes #679
[1.30.0] - 2023-05-30
Section titled “[1.30.0] - 2023-05-30”- formatter: fixed endset indent level, closes #670
- formatter: fixed issue with spaceless macro tags having spacess added before -, closes #667
- npm: install exact version of djlint
Feature
Section titled “Feature”- npm: add script to update djlint version in postinstall using semantic-release/exec
[1.29.0] - 2023-05-22
Section titled “[1.29.0] - 2023-05-22”- formatter: fix cases where ignore was still formatting set and function code, closes #659
- formatter: fix extra parenth being added in a function call, closes #660
- linter: fixed missing positive on a few <img rules
Feature
Section titled “Feature”- formatter: added option to disable newlines after yaml front matter, closes #662
- linter: allow codes to be ignored for remainder of file, closes #655
[1.28.0] - 2023-05-18
Section titled “[1.28.0] - 2023-05-18”- formatter: allow djlint:off to exluce the rest of a file, closes #649
- formatter: don’t add blank line to empty files, closes #635
Feature
Section titled “Feature”- formatter: added ability to format objects/arrays in function tags, closes #370
- formatter: format set blocks, closes #646
[1.27.2] - 2023-05-11
Section titled “[1.27.2] - 2023-05-11”- formatter: fixed an edge case wild regex grab, closes #640
- formatter: fixed formatting of plural tag in blocktrans, closes #641
- formatter: fixed js/css being formatted even inside ignored blocks, closes #613
- linter: fixed a few false positives/missing positives, added tests, closes #643 #642
- linter: fixed false postive in alpinejs tags for H037, closes #639
[1.27.1] - 2023-05-10
Section titled “[1.27.1] - 2023-05-10”- formatter: fixed set_ tags being broken, closes #634
- linter: fixed false positive on H037, closes #633
[1.27.0] - 2023-05-09
Section titled “[1.27.0] - 2023-05-09”- linter: fixed overly greedy H037, improved linter tests, closes #631
Feature
Section titled “Feature”- formatter: Add option to not condense multi-line-tags
[1.26.0] - 2023-05-08
Section titled “[1.26.0] - 2023-05-08”- blocktrans: fixes whitespace issues on blocktrans, allows indenting on blocktrans trimmed, closes #623
Feature
Section titled “Feature”- formatter: added white space cleanup for template tags, closes #485
- linter: added rule H037
- void tags: added option to auto close void tags (linter rule H017), closes #252
[1.25.1] - 2023-05-08
Section titled “[1.25.1] - 2023-05-08”- js indent: fixed an issue where literal strings were double indented, closes #614
- set: added formatting of json/list style set contents, closes #287 #518 #370
[1.25.0] - 2023-04-25
Section titled “[1.25.0] - 2023-04-25”- formatter: fixed extra indent on endblocktrans tags, closes #611
Feature
Section titled “Feature”- cli: added all args to cli, closes #595
[1.24.0] - 2023-04-24
Section titled “[1.24.0] - 2023-04-24”Feature
Section titled “Feature”- formatter: added option to prevent contents of some template tags from indenting
[1.23.3] - 2023-04-19
Section titled “[1.23.3] - 2023-04-19”- formatter: fixed speed on formatter, closes #601
[1.23.2] - 2023-04-19
Section titled “[1.23.2] - 2023-04-19”- blocktrans: fix issue with back to back blocktrans formatting, closes #600
[1.23.1] - 2023-04-18
Section titled “[1.23.1] - 2023-04-18”- yaml: fixed conflict with yaml and preserve_blank_lines option, closes #596
[1.23.0] - 2023-04-13
Section titled “[1.23.0] - 2023-04-13”Feature
Section titled “Feature”- formatter: will now attempt to fix case on known html tags by default, can be disabled, closes #589
[1.22.0] - 2023-04-12
Section titled “[1.22.0] - 2023-04-12”Feature
Section titled “Feature”- whitespace: improved whitespace handling on tag closing bracket, closes #582
[1.21.0] - 2023-04-12
Section titled “[1.21.0] - 2023-04-12”Feature
Section titled “Feature”- linter: added rule H036. Avoid use of
tags. Disabled by default, closes #571
[1.20.0] - 2023-04-12
Section titled “[1.20.0] - 2023-04-12”Feature
Section titled “Feature”- linter: added option to disable rules by default. Split H017 and disabled by default, closes #372
- yaml: added line break after yaml front matter, closes #584
[1.19.17] - 2023-04-05
Section titled “[1.19.17] - 2023-04-05”- blocktrans: allowed closing transblocks to be indented if they have a leading space
- custom tags: fixed issue where end tag for custom block was not de-indented, closes #572
- ignored code: fixed formatting of ignore code inside django comment blocks, closes #569
- linter: linter will now ignore {% raw %} {% endraw %} blocks, closes #539
- max line length: fixes issues around max line length not fully respected on indented lines, closes #580
- preserving space: misc improvements for the preserve leading space option, closes #566
[1.19.16] - 2023-02-27
Section titled “[1.19.16] - 2023-02-27”- ignored rules: prevent ignoring a single rule from ignoring multiple, closes #560
[1.19.15] - 2023-02-20
Section titled “[1.19.15] - 2023-02-20”- formatter: fixed template tag formatting with trailing parenthesis, closes #554
[1.19.14] - 2023-02-07
Section titled “[1.19.14] - 2023-02-07”- config: added error message print when config loading fails, closes #531
[1.19.13] - 2023-01-23
Section titled “[1.19.13] - 2023-01-23”- handlebars each: fixed bug in handlebars tags w/ trailing pipe, closes #529
[1.19.12] - 2023-01-19
Section titled “[1.19.12] - 2023-01-19”- docs: fixed doc build
- formatter: preserve windows line endings, closes #502
[1.19.11] - 2023-01-04
Section titled “[1.19.11] - 2023-01-04”- linter: fixes false positive on D018, closes #501
[1.19.10] - 2022-12-26
Section titled “[1.19.10] - 2022-12-26”- check: fixed issue where check was reformatting files that contained a hyphen in the name, closes #494
[1.19.9] - 2022-12-16
Section titled “[1.19.9] - 2022-12-16”- stdin —check: stdin with the —check flag should return a formatted output, closes #486
[1.19.8] - 2022-12-15
Section titled “[1.19.8] - 2022-12-15”- attributes: fixed outer quotes being stripped from attribute values, closes #471
- settings: fixed pyproject loader, closes #469
- textarea: fixed textarea attribute formatting, closes #486
[1.19.7] - 2022-11-09
Section titled “[1.19.7] - 2022-11-09”- formatter: fixed a few broken alpinejs attributes, closes #448
[1.19.6] - 2022-11-08
Section titled “[1.19.6] - 2022-11-08”- css/js: fixed extra blank lines being appended to blank lines in css/js formatter, closes #451
[1.19.5] - 2022-11-07
Section titled “[1.19.5] - 2022-11-07”- linter: make attribute pattern on H025 more accepting. Prevent false positive, closes #447
[1.19.4] - 2022-11-03
Section titled “[1.19.4] - 2022-11-03”- attributes: fixed poor django attribute parsing, closes #427 #438
- attributes: prevented attribute indentation for url type attributes, closes #320 #86 #195
- image tag: added image tag to template break tag list. srcset formatting, closes #444
[1.19.3] - 2022-10-25
Section titled “[1.19.3] - 2022-10-25”- formatter: fixed poor formatting on long inline blocks, closes #432
[1.19.2] - 2022-10-21
Section titled “[1.19.2] - 2022-10-21”- windows+py3.9: fixed an issue on windows with py3.9 and stdin
[1.19.1] - 2022-10-13
Section titled “[1.19.1] - 2022-10-13”- formatter: fixed indent on inline block followed by inline template block, closes #425
[1.19.0] - 2022-10-12
Section titled “[1.19.0] - 2022-10-12”- formatter: fixed formatting on nested inline comments, closes #423
Feature
Section titled “Feature”- configuration: allow local configuration to override global config, closes #422
[1.18.0] - 2022-09-26
Section titled “[1.18.0] - 2022-09-26”Feature
Section titled “Feature”- quiet: updated output of the —quiet flag to reduce unneeded verbose stuff
[1.17.3] - 2022-09-26
Section titled “[1.17.3] - 2022-09-26”- linter: fixed false positive on H017. Added test, closes #406
- linter: fixed false positive on T002. Added tests, closes #405
[1.17.2] - 2022-09-22
Section titled “[1.17.2] - 2022-09-22”- formatter: fixed issue with blank links added between blocks, closes #402
[1.17.1] - 2022-09-21
Section titled “[1.17.1] - 2022-09-21”- formatter: fixed poor indentation on span tags with leading text, closes #398
- t002: fixed false positive in t002. Added test, closes #399
[1.17.0] - 2022-09-20
Section titled “[1.17.0] - 2022-09-20”Feature
Section titled “Feature”- stats: moved linter stats to be appended to lint output, closes #396
[1.16.0] - 2022-09-19
Section titled “[1.16.0] - 2022-09-19”- linter: t002
Feature
Section titled “Feature”- linter: added —statistics flag to print summary of linter findings, closes #389
[1.15.0] - 2022-09-16
Section titled “[1.15.0] - 2022-09-16”- formatter: fixed formatting of repeating inline tags, closes #387
Feature
Section titled “Feature”- linter t034: added linter T034 to check for {% … }% typo, closes #385
- linter: t002 added a few more tags to the check, closes #386
[1.14.2] - 2022-09-15
Section titled “[1.14.2] - 2022-09-15”- span: fixed indent on nested inline tags on a span, closes #383
[1.14.1] - 2022-09-14
Section titled “[1.14.1] - 2022-09-14”- alpine js: fix incorrect indent on alpinejs attribs w/ nested HTML, closes #381
[1.14.0] - 2022-09-12
Section titled “[1.14.0] - 2022-09-12”Feature
Section titled “Feature”- config: allow source files to be specified in the config file, closes #371
[1.13.0] - 2022-09-12
Section titled “[1.13.0] - 2022-09-12”Feature
Section titled “Feature”- config: added option for custom configuration file path, closes #170
- windows: added a better progress bar char for windows, closes #286
[1.12.3] - 2022-09-07
Section titled “[1.12.3] - 2022-09-07”- cssbeautify: added support for ignore in cssbeautifier
- js formatting: added support for jsbeautify ignore blocks, closes #367
[1.12.2] - 2022-09-07
Section titled “[1.12.2] - 2022-09-07”- release: trigger a release to remove the print statment
[1.12.1] - 2022-08-30
Section titled “[1.12.1] - 2022-08-30”- macro: allow html tags inside macro functions to skip formatting, closes #353
- t001: fixed false positive on T001 with Jinja {{- and {{+ tags, closes #354
[1.12.0] - 2022-08-24
Section titled “[1.12.0] - 2022-08-24”- h006: prevented false positives on H006, closes #344 #333
- h012: prevent H012 from matching the contents of tags or attributes, closes #348
- t001: fixed false positive on multiline template tags, closes #350
Feature
Section titled “Feature”- h021: allow inline styles that contain template syntax, closes #351
- t002: allow variables names to be used in the {% extends tag, closes #349
[1.11.1] - 2022-08-22
Section titled “[1.11.1] - 2022-08-22”- formatter: fixed runaway regex on templates with many template attriutes inside html tags, closes #340
- linter: fixed false positive on T032 with jinja multi line set, closes #342
- linter: fixed false postive on rule H008, closes #339
- linter: prevent linter matches that overlap ignored blocks of code such as comments, closes #343
[1.11.0] - 2022-08-18
Section titled “[1.11.0] - 2022-08-18”Feature
Section titled “Feature”- jinja call: added support for jinja call blocks, closes #337
[1.10.0] - 2022-08-17
Section titled “[1.10.0] - 2022-08-17”Feature
Section titled “Feature”- linter: updated rule 18 to allow “tel:”, closes #334
[1.9.5] - 2022-08-16
Section titled “[1.9.5] - 2022-08-16”- formatter: fix IndexError while adding indentation to attributes, closes #290
[1.9.4] - 2022-08-02
Section titled “[1.9.4] - 2022-08-02”- requirements: removed optional deps from requirements section. Cleaned up tox, closes #322
[1.9.3] - 2022-08-01
Section titled “[1.9.3] - 2022-08-01”- formatter: fix to prevent formatter from breaking malformed attribute tags, closes #317
- linter: disabling linter rules should not disable formatting, closes #316
[1.9.2] - 2022-07-29
Section titled “[1.9.2] - 2022-07-29”- t027: fixed test and regression in T027, closes #141
[1.9.1] - 2022-07-28
Section titled “[1.9.1] - 2022-07-28”- formatter: fixed greedy regex issue when finding script and style tags
[1.9.0] - 2022-07-28
Section titled “[1.9.0] - 2022-07-28”Feature
Section titled “Feature”- formatter: added options to format css and js using jsbeautifier
[1.8.1] - 2022-07-28
Section titled “[1.8.1] - 2022-07-28”- indent: fixed bad indent on short blocks, closes #309
[1.8.0] - 2022-07-28
Section titled “[1.8.0] - 2022-07-28”Feature
Section titled “Feature”- formatter: added option to add blank line before tags, closes #307
[1.7.4] - 2022-07-26
Section titled “[1.7.4] - 2022-07-26”- linter: fixed false positive on T027, closes #301
[1.7.3] - 2022-07-26
Section titled “[1.7.3] - 2022-07-26”- preserve blank lines: fixed duplicate blank lines being inserted after h-space,, closes #300
[1.7.2] - 2022-07-25
Section titled “[1.7.2] - 2022-07-25”- white space: prevent duplicate blank lines from being added, closes #297
[1.7.1] - 2022-07-22
Section titled “[1.7.1] - 2022-07-22”- linter: fix false positive on rule T001, closes #292
- twig: fixed indent issue with comments. Added test, closes #290
[1.7.0] - 2022-07-08
Section titled “[1.7.0] - 2022-07-08”- git bash: fixes char encoding on windows git bash, closes #275
Feature
Section titled “Feature”- linter: added per-file-ignores as a config option for linter rules, closes #107
[1.6.0] - 2022-07-06
Section titled “[1.6.0] - 2022-07-06”Feature
Section titled “Feature”- npm: added npm publish
[1.5.0] - 2022-07-06
Section titled “[1.5.0] - 2022-07-06”- h026: fixes rule H026 for cases where id/class are part of another string, closes #281
Feature
Section titled “Feature”- npm: updated npm installer, closes #192
[1.4.0] - 2022-07-05
Section titled “[1.4.0] - 2022-07-05”Feature
Section titled “Feature”- ignore rules: added option to ignore linter rules with inline comments, closes #113
[1.3.0] - 2022-06-30
Section titled “[1.3.0] - 2022-06-30”- h025: fixes rule H025 where tags have curly hash, closes #270
Feature
Section titled “Feature”- new option: added option to attempt to keep blank lines in templates, closes #261
[1.2.1] - 2022-06-21
Section titled “[1.2.1] - 2022-06-21”- curly hash comment: fix formatting on curly hash comment blocks, closes #265
[1.2.0] - 2022-06-16
Section titled “[1.2.0] - 2022-06-16”Feature
Section titled “Feature”- whitespace: add option to preserver some whitespace before text, closes #260
[1.1.1] - 2022-05-18
Section titled “[1.1.1] - 2022-05-18”- windows: fixed windows output. colorama was converting to cp1252
[1.1.0] - 2022-05-18
Section titled “[1.1.0] - 2022-05-18”- dj018: fix rule DJ018 for special attrib names, closes #248
- stdin encoding: added encoding to stdin text, closes #243
Feature
Section titled “Feature”- breaks: allowed p, head, and body tags that are short/empty to be on a single line
[1.0.3] - 2022-05-13
Section titled “[1.0.3] - 2022-05-13”- code tags: fixed indentation on code tags w/ trailing text, closes #244
[1.0.2] - 2022-05-09
Section titled “[1.0.2] - 2022-05-09”- Bug fixes #240
[1.0.1] - 2022-05-02
Section titled “[1.0.1] - 2022-05-02”- Bug fixes #236
[1.0.0] - 2022-04-25
Section titled “[1.0.0] - 2022-04-25”- Bug fixes #224
[0.7.6] - 2022-03-14
Section titled “[0.7.6] - 2022-03-14”[0.7.5] - 2022-02-21
Section titled “[0.7.5] - 2022-02-21”- Bug fixes #187
- Added better support for
yamlfront matter in template files - Added rule T032 for #123
- Added rule H033 for #124
- Changed linter profiles to be inclusive vs exclusive for #178
- Added alternate config file option
.djlintrcfor #188
[0.7.4] - 2022-01-31
Section titled “[0.7.4] - 2022-01-31”- Bug fixes #177
[0.7.3] - 2022-01-24
Section titled “[0.7.3] - 2022-01-24”[0.7.2] - 2022-01-14
Section titled “[0.7.2] - 2022-01-14”[0.7.1] - 2022-01-05
Section titled “[0.7.1] - 2022-01-05”- Bug fixes #166
[0.7.0] - 2022-01-03
Section titled “[0.7.0] - 2022-01-03”- Added config for custom HTML tags
- Bug fixes
[0.6.9] - 2021-12-14
Section titled “[0.6.9] - 2021-12-14”- Added HTML and Angular profiles
- Allowed some entities in rule #H023
- Bug fixes
[0.6.8] - 2021-12-02
Section titled “[0.6.8] - 2021-12-02”- Bug fixes
- Updated docs
[0.6.7] - 2021-11-29
Section titled “[0.6.7] - 2021-11-29”- Added config option
format_attribute_template_tagsas opt-in for template tag formatting inside of attributes - Added config option
linter_output_formatto customize linter message variable order - Added rules H030 and H031 to check meta tags
[0.6.6] - 2021-11-29
Section titled “[0.6.6] - 2021-11-29”- Big fixes
[0.6.5] - 2021-11-26
Section titled “[0.6.5] - 2021-11-26”- Updated output paths to be relative to the project root
- Bug fixes
[0.6.4] - 2021-11-26
Section titled “[0.6.4] - 2021-11-26”- Bug fixes
[0.6.3] - 2021-11-26
Section titled “[0.6.3] - 2021-11-26”- Added support for django
blocktranstag - Bug fixes
[0.6.2] - 2021-11-23
Section titled “[0.6.2] - 2021-11-23”- Bug fixes
[0.6.1] - 2021-11-19
Section titled “[0.6.1] - 2021-11-19”- Bug fixes
- Made rule T028 stricter with clearer message
[0.6.0] - 2021-11-16
Section titled “[0.6.0] - 2021-11-16”- Added rule T027 to check for unclosed in template syntax
- Added rule T028 to check for missing spaceless tags in attributes
- Added rule H029 to check for lowercase form method
- Ignored django blocktranslate tags that do not have “trimmed” from formatter
- Bug fixes
[0.5.9a] - 2021-11-15
Section titled “[0.5.9a] - 2021-11-15”- Added test support for python 3.10
- Added pre-commit hook
[0.5.9] - 2021-10-29
Section titled “[0.5.9] - 2021-10-29”- Added option
--use-gitignoreto extend the excludes - Changed default exclude matching
- Fixed windows exclude paths
- Fixed formatting of
{%...%}tags in attributes - Fixed formatting for for loops and nested conditions in attributes
[0.5.8] - 2021-10-15
Section titled “[0.5.8] - 2021-10-15”- Added require_pragma option
- Updated DJ018 to catch
data-srcandactionon inputs - Fixed inline ignore syntax
- Added
--lintoption as placeholder for default usage - Bug fixes
[0.5.7] - 2021-10-11
Section titled “[0.5.7] - 2021-10-11”- Bug fixes
[0.5.6] - 2021-10-07
Section titled “[0.5.6] - 2021-10-07”- Added rule H026 to find empty id and class tags
- Bug fixes
[0.5.5] - 2021-10-07
Section titled “[0.5.5] - 2021-10-07”- Consolidated settings and slimmed code
- Bug fixes
[0.5.4] - 2021-10-06
Section titled “[0.5.4] - 2021-10-06”- Added rule H020 to find empty tag pairs
- Added rule H021 to find inline styles
- Added rule H022 to find http links
- Added rule H023 to find entity references
- Added rule H024 to find type on scripts and styles
- Added rule H025 to check for orphan tags. Thanks to https://stackoverflow.com/a/1736801/10265880
- Improved attribute formatting
- Updated
blank_line_after_tagoption to add newline regardless of location - Fixed django
transtag formatting - Added formatting for inline styles
- Added formatting for template conditions inside attributes
- Added srcset as possible url location in linter rules
- Speed up formatting
- Special thanks to jayvdb
[0.5.3] - 2021-10-05
Section titled “[0.5.3] - 2021-10-05”- Change stdout for
--reformat/checkoptions to only print new html when using stdin as the input
[0.5.2] - 2021-10-05
Section titled “[0.5.2] - 2021-10-05”- Split
altrequirement from H006 to H013 - Added optional custom rules file
- Added
golangas profile option - Fixed formatting of ignored blocks containing inline comments
- Added default text to
--indentand-eoptions - Update url rules to accept #
- Fixed file encoding on Windows OS
- Fix single line template tag regex
- Fix
blank_line_after_tagfor tags with leading space
[0.5.1] - 2021-10-04
Section titled “[0.5.1] - 2021-10-04”- Added rule H019
- Fixed bugs in DJ018 and H012
[0.5.0] - 2021-10-04
Section titled “[0.5.0] - 2021-10-04”- Fixed several regex matching bugs in linter rules
- Stopped linter from returning errors in ignored blocks
- Added option to ignore code block from linter/formatter with
{% djlint:off %}...{% djlint:on %}tags
[0.4.9] - 2021-10-01
Section titled “[0.4.9] - 2021-10-01”- Fixed bug #35
[0.4.8] - 2021-10-01
Section titled “[0.4.8] - 2021-10-01”- Fixed bug #34
[0.4.7] - 2021-09-30
Section titled “[0.4.7] - 2021-09-30”- Moved
sourcetag to single line tags
[0.4.6] - 2021-09-30
Section titled “[0.4.6] - 2021-09-30”- Fixed bug #31
[0.4.5] - 2021-09-30
Section titled “[0.4.5] - 2021-09-30”- Added best practices to docs
- Add
--profileoption to set default linter/formatter rules - Added linter rules for jinja url patterns
[0.4.4] - 2021-09-28
Section titled “[0.4.4] - 2021-09-28”- Change indent config from string to int.
--indent 3
[0.4.3] - 2021-09-28
Section titled “[0.4.3] - 2021-09-28”- Added cli option for indent spacing.
--indent=" "
[0.4.2] - 2021-09-23
Section titled “[0.4.2] - 2021-09-23”- Added support for additional whitespace after tags with
blank_line_after_tagoption
[0.4.1] - 2021-09-22
Section titled “[0.4.1] - 2021-09-22”- Added support for processing several files or folders at once
[0.4.0] - 2021-09-21
Section titled “[0.4.0] - 2021-09-21”- Fixed formatting of django
{# ... #}tags - Added indent support for figcaption, details and summary tags
- Added support for overriding or extending the list of excluded paths in
pyproject.toml
[0.3.9] - 2021-09-20
Section titled “[0.3.9] - 2021-09-20”- Updated attribute handling
[0.3.8] - 2021-09-16
Section titled “[0.3.8] - 2021-09-16”- Added support for stdin
[0.3.7] - 2021-09-16
Section titled “[0.3.7] - 2021-09-16”- Fixed formatting on
small,dt, andddtags
[0.3.6] - 2021-09-08
Section titled “[0.3.6] - 2021-09-08”- Added formatter support for Nunjucks
{%-opening blocks
[0.3.5] - 2021-09-08
Section titled “[0.3.5] - 2021-09-08”- Added support for more Django blocks
- Added support for custom blocks
- Added support for config in
pyproject.toml
[0.3.4] - 2021-09-01
Section titled “[0.3.4] - 2021-09-01”- Fixed Nunjucks spaceless tag
-%}format
[0.3.3] - 2021-08-31
Section titled “[0.3.3] - 2021-08-31”- Allowed short
divtags to be single line
[0.3.2] - 2021-08-30
Section titled “[0.3.2] - 2021-08-30”- Fixed Django comment formatting
- Ignored textarea from formatting
[0.3.1] - 2021-08-30
Section titled “[0.3.1] - 2021-08-30”- Updated attribute formatting regex
- Updated lint rule W010
[0.3.0] - 2021-08-30
Section titled “[0.3.0] - 2021-08-30”- Changed exit code to 1 if there were any formatting changes
- Added support for Jinja
assettags
[0.2.9] - 2021-08-19
Section titled “[0.2.9] - 2021-08-19”- Updated W018 regex
- Removed duplicate lint messages
- Updated E001 for Handlebars
[0.2.8] - 2021-08-19
Section titled “[0.2.8] - 2021-08-19”- Fixed progress bar error for old Click version
Releases from 0.0.5 (2021-07-12) to 0.2.7 were published without release notes.