-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Can't start a template with a { brace #24
Comments
Thanks for the report! I fixed it in 82d85bb and released version 0.3.4 to crates.io, I also added a test case to make sure it doesn't regress. Let me know if you have any other feedback about the project, please! |
Thanks! Re: feedback - Overall, I'm a huge fan. I'm using it for a port of an internal tool that relies on a handful of Jinja2 templates, and in general, I like it much more than Jinja2 itself. I've had a small handful of cases where askama renders invalid templates as empty or missing content (like this issue) - so I'd like to see basically ANY template error break compilation. I've also opted to flatten my template directory for now because I was tripping over the module path when using template inheritance for templates not in the root of the |
Great feedback!
|
I'll recreate the repro for it in the next day or two and create an issue to discuss it in more detail.
So far nothing has jumped out that I really miss (still early though). I can see that I'll need to work around inclusion of partials. In particular, I have a jinja2 template with this:
but I don't think that makes as much sense in Askama for 2 reasons:
Sounds neat for some scenarios, but I don't think that would benefit me currently. It's an infra/deployment tool that generates dozens of config files ranging from Play Framework config, to log4j XML configs, to kubernetes YAML files, etc... One of our services depends on a JSON file, and I basically just needed to inject a few values into specific locations within the JSON template. |
Simply starting a template file with a single
{
character (e.g a JSON file) causes the AST and code to be empty:Prepend an extra space or newline and the template renders fine.
The text was updated successfully, but these errors were encountered: