1
0
Fork 0
forked from github/pelican

fix: keep newline at the end of the file in tools

As referenced in Jinja documentation about whitespace control:
<https://jinja.palletsprojects.com/en/3.1.x/templates/#whitespace-control>
>  To keep single trailing newlines, configure Jinja to
>  `keep_trailing_newline`
I added this to our Jinja environment to keep EOL new line in tools
scripts
This commit is contained in:
Salar Nosrati-Ershad 2023-11-22 22:54:30 +03:30
commit 7466b13e0a
2 changed files with 4 additions and 0 deletions

3
RELEASE.md Normal file
View file

@ -0,0 +1,3 @@
Release type: patch
Keep the newline at the end of the file in generating tools scripts

View file

@ -44,6 +44,7 @@ _TEMPLATES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "templ
_jinja_env = Environment(
loader=FileSystemLoader(_TEMPLATES_DIR),
trim_blocks=True,
keep_trailing_newline=True,
)