First newline after verbatim and endverbatim tags is not removed
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the example in the linked TwigFiddle, comparing the verbatim/endverbatim behavior with autoescape and the documented newline rule. Trace the template-tag handling involved and confirm the fix by matching the expected output shown in the issue, including the newline after the verbatim tag.
Written by the indexing model from the issue text.
Description
The documentation of Twig says:
The first newline after a template tag is removed automatically (like in PHP).
But this does not work with the verbatim and endverbatim tag:
bar{% verbatim %}
foo{% endverbatim %}
bar
bar{% autoescape %}
foo{% endautoescape %}
bar
=>
bar
foo
bar
barfoobar
- Dominant language
- PHP
- Stars
- 8.4k
- Forks
- 1.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 37
Contributor guide
No contributing guide indexed for this repository
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 twigphp/Twig
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getgrav/grav-plugin-api#45 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RSS-Bridge/rss-bridge#5098 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
phingofficial/phing#2025 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
silverstripe/developer-docs#911 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100