{{'false' ? 'yes' : 'no'}} is interpreted as {{false ? 'yes' : 'no'}}
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 30/100
Research direction
Start by reproducing the example with PARAM set to the string "false" and the conditional expression shown in the issue. Trace how Jinjava evaluates string values in boolean conditions; done means determining whether this is intended behavior or identifying a focused change and a regression test for preserving the string value.
Written by the indexing model from the issue text.
Description
Hello. I found that if a string has a boolean value, then it is interpreted as the boolean value it contains.
For example
PARAM = "false"
JINJA_EXPR = {{ PARAM ? PARAM : "" }}
After rendering JINJA_EXPR, the output is "" but I expect it to be "false" meaning the param is present and can be used.
Could you please explain how to remove this behavior? Or if the latter is not possible could you please tell me how to resolve the case I described?
- 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
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/flink-agents#1152 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
jenkinsci/blueocean-plugin#5417 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
objectionary/eo-graphs#75 ·