Skip to content

[Improvement] Add Twig modifier for whitespace trimming #822

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

Merged
merged 2 commits into from
Mar 14, 2025

Conversation

GxiGloN
Copy link
Contributor

@GxiGloN GxiGloN commented Mar 13, 2025

Just a minor improvement, to avoid adding whitespace in the links anchor text.

Before:
capture_250313_174437

After:
capture_250313_174455

See https://twig.symfony.com/doc/3.x/templates.html#whitespace-control.

I also fixed indentation of the templates/Pagination/uikit_v3_pagination.html.twig file. Tell me if that should go in a dedicated PR.

Copy link
Collaborator

@garak garak left a comment

Choose a reason for hiding this comment

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

I'm OK with trimming useless whitespaces, but unrelated changes should be reserved for a specific PR

@@ -13,70 +13,69 @@
#}
{% if pageCount > 1 %}
<ul class="uk-pagination uk-flex-center uk-margin-medium-top">
{% if previous is defined %}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This change seems unrelated with the main topic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's due to the indentation fix. I've reverted these changes to keep only the ones linked to the whitespace trimming.

@GxiGloN GxiGloN force-pushed the bugfix-whitespace-trimming branch from e99e3f9 to ddb655e Compare March 14, 2025 08:49
@garak garak merged commit c078888 into KnpLabs:master Mar 14, 2025
16 checks passed
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.

2 participants