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:
parent
d9b2bc3a4e
commit
7466b13e0a
2 changed files with 4 additions and 0 deletions
3
RELEASE.md
Normal file
3
RELEASE.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Release type: patch
|
||||
|
||||
Keep the newline at the end of the file in generating tools scripts
|
||||
|
|
@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue