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

Missing filter custom handling #307

Open
jkirschnik12 opened this issue Jan 23, 2024 · 1 comment
Open

Missing filter custom handling #307

jkirschnik12 opened this issue Jan 23, 2024 · 1 comment

Comments

@jkirschnik12
Copy link

jkirschnik12 commented Jan 23, 2024

Hello,

I was wondering if you'd ever consider adding support for overriding the behavior when a non-existent filter is used in the template string.

Currently if the filter is not found an exception is thrown (relevant code). Our company would like the ability to override this behavior.

Current:
(render "{{a | nonExistentFilter}}" {:a 1}) => Throws Exception: No filter defined with the name nonExistentFilter

Desired (for my use case):
(render "{{a | nonExistentFilter}}" {:a 1}) => "{{a | nonExistentFilter}}" no thrown exceptions.

I was thinking this would be similar to the work done in #130 where we'd allow users to override a var that would default to the existing behavior.

I'd be open to submitting a PR for this and have a proof of concept of the functionality.

Thanks!

@yogthos
Copy link
Owner

yogthos commented Jan 23, 2024

That sounds like a good idea, and a PR would be very welcome!

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

No branches or pull requests

2 participants