-
Notifications
You must be signed in to change notification settings - Fork 54
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
Feature request: customizable escape function #125
Comments
@redsun82 did you manage to workaround this? |
@shahargl not really, I filed this when I was considering porting my code from pystache to chevron, but this was a blocker, so I just kept pystache |
@redsun82 Got you. Why did you consider moving? I see pystache last commit is 10 years ago, do you have any problem with it? |
@shahargl pystache works reasonably ok, but it's not up to date with the mustache spec. In particular I was interested in parents with overrideable blocks, which would simplify a bit my templates, but are not supported by pystache. Obviously a workaround for this specific issue to use chevron is to consistently use |
It' be nice to be able to pass an escaping function to accommodate instantiating templates for non-html languages. Pystache supports this via an
escape
parameter. As a use case, I use mustache templates in C++ code generation, where escaping&
breaks everything. I can explicitly unescape things in the templates, but it's just easier to passescape=lambda x: x
. JSON string escaping comes to mind as another use case.The text was updated successfully, but these errors were encountered: