Template Render to keep unresolved variables as-is in the output
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
No files, tests, or entry points are named. Start by locating Jinjava's handling of undefined variables and any configuration or undefined-value tests; done means rendering the provided template preserves {{quantity}} while still substituting name.
Written by the indexing model from the issue text.
Description
I am interested in rendering a template in multiple steps or keeping the references for the undefined variables in Jinja2.
Basically not to set value as null for undefined/unresolved variables and keep references/variable as-is if they are missing in the context.
Example: Let's say context has only name = "test", and then redering the following template:
<p>{{name}} has {{quantity}}</p>
I expact the output as below:
<p>test has {{quantity}}</p>
but as of today, output looks like below:
<p>test has </p>
Does anyone know if this is achievable within current version, or it would need an additional configuration to be added ?
- Dominant language
- Java
- Stars
- 785
- Forks
- 184
- Avg merge
- 6d 22h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from HubSpot/jinjava
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Jinjava 3.0 Open
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
1.0.0-alpha2 Type/Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wso2/dpdp-accelerator#272 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
apache/rocketmq-dashboard#4860 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·