You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Melody should not throw an error, and the output between the set and endset tags should be contained within the variable name as defined within the set tag.
Actual Behaviour
Melody throws an error: Property right of AssignmentExpression expected node to be of a type ["Expression"] but instead got undefined
Steps to reproduce
Define a Twig file that contains:
{% set test = 'boo' %}
{% set test %}
hi there
{% endset %}
{{ test }}
The text was updated successfully, but these errors were encountered:
Yes. Its a limitation of how Melody works. We could support plain text or force you to use the raw filter but either way you'd be hit by a performance penalty. And things would get really messy if you were using macros, blocks, includes or loops within such a set block (I can provide more information if you're interested).
Explain the problem
Twig's
set
tag can be used to capture chunks of text (see https://twig.symfony.com/doc/2.x/tags/set.html) but Melody throws an error.Expected Behaviour
Melody should not throw an error, and the output between the
set
andendset
tags should be contained within the variable name as defined within theset
tag.Actual Behaviour
Melody throws an error:
Property right of AssignmentExpression expected node to be of a type ["Expression"] but instead got undefined
Steps to reproduce
Define a Twig file that contains:
The text was updated successfully, but these errors were encountered: