-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add case conversion filters. #59
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needs to be rebased.
Looking at the source of tera-text-filters, it's probably better for us to just depend on heck
explicitely and add the few lines of glue without the extra dependency. We also don't need the docs for the filters in the source so thats literally maybe 15 LoC
src/generation.rs
Outdated
@@ -67,6 +68,7 @@ impl Template { | |||
path: Option<PathBuf>, | |||
) -> Result<String> { | |||
let mut tera = Tera::default(); | |||
register_all(&mut tera); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to use tera_text_filters::register_all(&mut tera)
and remove the import so it's clearer what happens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya I like this idea.
And I might take a look at depending on heck like you suggest.
8d97e9b
to
a2bb009
Compare
Alright, it took me a while to get back to this but I've made the changes you've requested. The PR now depends on heck directly. I put the filters in a new I also updated the README to include a bit about the additional filters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Hey, any thoughts on merging this one? |
Woops sorry completely slipped my mind. I'll merge and do a release next week. |
Hey,
Here's a quick little PR to add heck. This adds a few more text conversion options:
Maybe required?