Add {% hubl %} tag
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with the linked Shopify Liquid tag documentation and compare its syntax with the example in the issue. Done means Jinjava accepts the proposed {% hubl ... %} block and preserves the shown conditional behavior; the issue names no repository files or tests, so those must be located before implementation.
Written by the indexing model from the issue text.
Description
Feature request
Just like shopify has a {% liquid %} tag (see liquid tag in their docs), it would be beneficial to have a block of hubl without delimeters on each tag.
Example
Before:
{% if foo == 'bar' %}
{% set my_variable = 'xyz' %}
{% elif foo == 'baz' %}
{% set my_variable = 'pdq' %}
{% else %}
{% set my_variable = 'examine your zipper on channel 2' %}
{% endif %}
After:
{% hubl
if foo == 'bar'
set my_variable = 'xyz'
elif foo == 'baz'
set my_variable = 'pdq'
else
set my_variable = 'examine your zipper on channel 2'
endif
%}
Why
Shopify recommends using their liquid tag if four or more consecutive Liquid tags ({% ... %}) are found. They've even commited to that rule in their official theme check – and I think for good reason. Modules can get complicated – even with standard hubl functions and our own custom macros. The delimiters get clunky quick and I think a lot of devs get worn out.
This was originally brought up in this slack idea.
- 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 ·
-
agent-audit bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Vault-Web/cloud-page#144 ·