Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Add support for filter chaining in filter blocks - #984

Merged
GuillaumeGomez merged 4 commits into
askama-rs:mainfrom
GuillaumeGomez:filter-doc-chaining
Mar 11, 2024
Merged

Add support for filter chaining in filter blocks#984
GuillaumeGomez merged 4 commits into
askama-rs:mainfrom
GuillaumeGomez:filter-doc-chaining

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Collaborator

Follow-up of #959.

It allows to chain filters on filter blocks, making the feature much more useful. :)

With this, the feature will be complete.

@GuillaumeGomez
GuillaumeGomez requested review from Kijewski and djc March 7, 2024 18:13
Comment thread testing/tests/filter_block.rs Outdated
Comment thread askama_parser/src/node.rs
Comment thread askama_derive/src/generator.rs Outdated
Comment thread askama_parser/src/node.rs Outdated
Comment thread askama_derive/src/generator.rs Outdated
Comment thread askama_derive/src/generator.rs Outdated
@GuillaumeGomez

Copy link
Copy Markdown
Collaborator Author

Applied suggestions.

Comment thread askama_parser/src/lib.rs Outdated
Comment thread askama_parser/src/node.rs Outdated
@GuillaumeGomez

Copy link
Copy Markdown
Collaborator Author

Created a new Filter type in its own commit. It required to update a lot of tests, forcing me to remove the use Expr::* because of name conflict, it's mostly because of cases like this that I'm not a big fan matching on just variant names. 😉

Comment thread askama_parser/src/tests.rs
@GuillaumeGomez

Copy link
Copy Markdown
Collaborator Author

Fixed the commit mess. :)

Comment thread askama_parser/src/expr.rs Outdated
Comment thread askama_derive/src/generator.rs Outdated
@GuillaumeGomez

Copy link
Copy Markdown
Collaborator Author

Renamed and added documentation.

@GuillaumeGomez
GuillaumeGomez merged commit 3026829 into askama-rs:main Mar 11, 2024
@GuillaumeGomez
GuillaumeGomez deleted the filter-doc-chaining branch March 11, 2024 13:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants