Closed aarongoldenthal closed 1 year ago
@aarongoldenthal Thanks, do you have any config options set? I don't get this on mac, but will add a test and try on windows.
I do, my config is
{
"extension": "njk",
"indent": "4",
"blank_line_after_tag": "extends, include",
"blank_line_before_tag": "extends, include",
"profile": "nunjucks",
"require_pragma": false,
"max_line_length": "120",
"max_attribute_length": "100",
"use_gitignore": true,
"format_attribute_template_tags": true,
"preserve_leading_space": false,
"preserve_blank_lines": true,
"format_css": false,
"format_js": false
}
Thanks, I'm guessing it is the preserve_blank_lines. I'll check it out and try to get a fix out shortly.
:tada: This issue has been resolved in version 1.23.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
System Info
python --version
): 3.10.10 (Windows), 3.11.3 (Linux)djlint --version
): 1.23.0Issue
The fix for #584 in v1.20.0 adds an empty line after front matter in nunjucks files even if on exists.
How To Reproduce
Using the following as an example:
Running
djlint --reformat .
adds another empty line after the front matter, then runningdjlint --check .
fails saying another blank line would be added, and the cycle repeats.This worked properly in 1.19.17, but behaves as above starting in 1.20.0 and in all subsequent releases (currently through 1.23.0).