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

Expose built-in filters #410

Open
jannik4 opened this issue May 29, 2019 · 5 comments
Open

Expose built-in filters #410

jannik4 opened this issue May 29, 2019 · 5 comments

Comments

@jannik4
Copy link

jannik4 commented May 29, 2019

My current setup:

  • I use tera in a webserver and use "slugify" to slug a name/text as part of an url
  • In the route I want to check/compare the slugified part of the url with the slugified name

So it is important that I can use exactly the same slugify function in the rust code.

@Keats
Copy link
Owner

Keats commented May 30, 2019

I guess if you don't mind having to convert it to a Value? I'll take a PR for it

@jannik4
Copy link
Author

jannik4 commented May 31, 2019

I think this would be ok.
Do you think just making the builtin module public would be good? This would obviously make builtin functions and tests public, too.
The alternative I can think of would be to reexport builtin::filters as builtin_filters.

@Keats
Copy link
Owner

Keats commented May 31, 2019

Might as well just expose builtin

@Keats Keats mentioned this issue Jun 6, 2019
16 tasks
@Keats
Copy link
Owner

Keats commented Jun 9, 2019

Ah the little issue with that plan is that every single function needs to be documented now if they are made public :(

@Keats
Copy link
Owner

Keats commented Nov 30, 2019

That can be exposed after v1 release anyway, so not a blocker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants