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

FILTERS pragma for template loaders? #339

Open
mxdpeep opened this issue Jun 29, 2018 · 3 comments
Open

FILTERS pragma for template loaders? #339

mxdpeep opened this issue Jun 29, 2018 · 3 comments

Comments

@mxdpeep
Copy link

mxdpeep commented Jun 29, 2018

Hi!

I am just wondering if you've already thought about FILTERS for templates that would work the same way like for rendering values.

Filter would look like like this:
"stripcomments" => function($content) {return preg_replace('/<!--(.*)-->/Uis', '', $content)}

@bobthecow
Copy link
Owner

I hadn't thought about it. To be honest, I've never really felt the need. Can you share a bit more about your use case?

@dejurin
Copy link

dejurin commented Jan 3, 2020

With these filters, it is possible to minimize the template
I was write here #355

@miko007
Copy link

miko007 commented Feb 2, 2023

With these filters, it is possible to minimize the template
I was write here #355

why don't you just minify the end result after mustache is done processing?

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

4 participants