Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

announcements: add missing newline before before heading #589

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

gotmax23
Copy link
Contributor

We have trim_blocks enabled in the Jinja environment, so we need an
extra newline here.

@webknjaz
Copy link
Member

@gotmax23 does this leave one LF in the end? I'm always confused by how Jinja squashes stuff with those trims left and right.. I also need to figure out a related problem elsewhere...

We have trim_blocks enabled in the Jinja environment, so we need an
extra newline here.
@gotmax23
Copy link
Contributor Author

@gotmax23 does this leave one LF in the end? I'm always confused by how Jinja squashes stuff with those trims left and right.. I also need to figure out a related problem elsewhere...

trim_blocks removes a newline immediately following the end of a block. {% endif %} ends off the line so we need an extra newline to have one blank line before the heading, as the first newline is stripped out. You can see what it looks like in the test_data files that I just regenerated.

@webknjaz
Copy link
Member

webknjaz commented Feb 28, 2024

Thanks for the explanation!

@felixfontein felixfontein merged commit dbc0b90 into ansible-community:main Feb 28, 2024
9 checks passed
@felixfontein
Copy link
Collaborator

Thanks!

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