Skip to content

parser: refactor |filter and {% filter %} parsing#500

Merged
Kijewski merged 2 commits intoaskama-rs:masterfrom
Kijewski:pr-filters
Jun 24, 2025
Merged

parser: refactor |filter and {% filter %} parsing#500
Kijewski merged 2 commits intoaskama-rs:masterfrom
Kijewski:pr-filters

Conversation

@Kijewski
Copy link
Copy Markdown
Member

Deduplicated and easier to read code.

Deduplicated and easier to read code.
GuillaumeGomez
GuillaumeGomez previously approved these changes Jun 24, 2025
@GuillaumeGomez
Copy link
Copy Markdown
Collaborator

The span location changed apparently. It doesn't seem to include the input and the "|" operator anymore.

@Kijewski
Copy link
Copy Markdown
Member Author

Changing the span was actually intentionally. IHMO including the left-hand side of the | makes it more difficult to read. It could be arbitrarily complex, e.g. (a + a * a + a .. (a + a + a)) | a. The new commit omits the white space.

Do you dislike the change?

@GuillaumeGomez
Copy link
Copy Markdown
Collaborator

As long as we have the "|" operator, I'm good.

@Kijewski
Copy link
Copy Markdown
Member Author

Oh, it's our PR #500! That's quite an underwhelming 500th PR. :D

@Kijewski Kijewski mentioned this pull request Jun 24, 2025
@Kijewski Kijewski merged commit 4f52724 into askama-rs:master Jun 24, 2025
42 checks passed
@Kijewski Kijewski deleted the pr-filters branch June 24, 2025 13:02
@GuillaumeGomez
Copy link
Copy Markdown
Collaborator

GuillaumeGomez commented Jun 24, 2025

🎊 🎉 🥳

PS: My very nitpicky brain needs to address the "500th PR" part. On github, PR and issues share the same counter. That's it. 🤣

@Kijewski
Copy link
Copy Markdown
Member Author

Oh, I forgot about that. :D

337th merged PR 🥳 🎉

@GuillaumeGomez
Copy link
Copy Markdown
Collaborator

🤣

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