Skip to content

Keep EOF newline in quickstart-generated files#3251

Merged
justinmayer merged 2 commits into
getpelican:masterfrom
snosratiershad:support/new-line-at-end-of-scripts
Jan 17, 2024
Merged

Keep EOF newline in quickstart-generated files#3251
justinmayer merged 2 commits into
getpelican:masterfrom
snosratiershad:support/new-line-at-end-of-scripts

Conversation

@snosratiershad

@snosratiershad snosratiershad commented Nov 22, 2023

Copy link
Copy Markdown

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

Pull Request Checklist

  • Ensured tests pass and (if applicable) updated functional test output
  • Conformed to code style guidelines by running appropriate linting tools
  • Added tests for changed code # NOT REQUIRED
  • Updated documentation for changed code # NOT REQUIRED

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
@justinmayer justinmayer changed the title fix: keep newline at the end of the file in tools Keep EOF newline in quickstart-generated files Jan 17, 2024

@justinmayer justinmayer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks to @snosratiershad for the contribution and to @avaris for reviewing 😊

@justinmayer justinmayer merged commit f2ab4a1 into getpelican:master Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants