jinja
jinja copied to clipboard
A very fast and expressive template engine.
In the StringTemplate engine - which I've used in some projects to emit C code - whitespace prefixes are automatically added in the output lines: ``` PrintCFunction(linesGlobal, linesLocal) ::= >...
I have a case where Jinja doesn't find a template which is loaded using the `PackageLoader("gcovr")`. For reference, see https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd: > File I/O functions in the Windows API convert "/"...
This fixes a bug where calling `{% set %}` in all 3 branches of an `{% if %}` block could result in the parameter being undefined sometimes. If the `{%...
- fixes #1661 Checklist: - [ ] Add tests that demonstrate the correct behavior of the change. Tests should fail without the change. - [ ] Add or update relevant...
Every time there's an issue that requires looking at the lexer and parser, I worry due to the amount of complexity and under-documented behavior. The lexer depends on a bunch...
I have the following **Jinja** template: ```jinja {% if new_data_set_created is defined %} {% if new_data_set_created == True %} The new image data set {{ form_data["data_set_name"] }} has been created....
This fixes a bug that existed because namespaces within `{% set %}` were treated as a special case. This special case had the side-effect of bypassing the code which allows...
Inner-for-loop-variables are not accessible when a pass_context function is called from within a forloop. As example, take the following pass_context-function. ``` @pass_context def apply_prefix(context, value, **kwargs): ``` When the above...
Replace this comment with a clear outline of what the bug is. --> In Jinja we can use standard python multi-variable assignments like line 3 below, which successfully evaluates but...
This was from https://github.com/apache/airflow/issues/23333 where trying to load a template that doesn't exist in the searchpath raises `TemplateNotFound` exception. In this case an absolute path is used which causes issue...