Skip to content

Commit

Permalink
fix: keep newline at the end of the file in tools
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Salar Nosrati-Ershad committed Nov 22, 2023
1 parent d9b2bc3 commit 7466b13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Release type: patch

Keep the newline at the end of the file in generating tools scripts
1 change: 1 addition & 0 deletions pelican/tools/pelican_quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
_jinja_env = Environment(
loader=FileSystemLoader(_TEMPLATES_DIR),
trim_blocks=True,
keep_trailing_newline=True,
)


Expand Down

0 comments on commit 7466b13

Please sign in to comment.