Skip to content

Conversation

@drtheuns-enreach
Copy link
Contributor

In versions 0.* it was possible to pass the opts to custom filters. It would attempt to call the filter with the opts appended to it first and then without the opts. This was lost in the transition to 1.0. The previous implementation could be problematic with, for example, default arguments, so I support it's removal, but I would still like the ability to pass context to filters that weren't explicitly passed in the template and I'd rather not resort to the process dict.

This PR adds makes it possible for the caller to completely implement the filter logic themselves and additional context can be taken from the lambda's scope.

@edgurgel
Copy link
Owner

Hey thanks for the PR! Will review in the next couple of days!

Copy link
Owner

@edgurgel edgurgel left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@edgurgel edgurgel merged commit 6422b46 into edgurgel:main Oct 26, 2025
3 checks passed
@smn
Copy link

smn commented Dec 11, 2025

This is great! Any chance a new release could be made to include this change?

@edgurgel
Copy link
Owner

Oops! My bad! 1.2.0 is out 🎉

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