Linebreaks inside "with" params will cause an exception
Closed this issue · 1 comments
bluemoehre commented
I noticed line breaks inside the parameters object will break the embed function.
Will work:
{% embed 'skeletons/sidebarBox.twig' with { 'class': 'relatedContents' } %}
…
{% endembed %}
Won't work:
{% embed 'skeletons/sidebarBox.twig' with {
'class': 'relatedContents'
} %}
…
{% endembed %}
TwigException: Unable to parse 'embed 'skeletons/sidebarBox.twig' with {
'class': 'relatedContents'
}'
This behavior is different to include
and require
where line breaks cause no trouble.
Deleted user commented
This is just the gulp plugin. The bug is in twig.js, it seems to be fixed already.
twigjs/twig.js#386
I suggest to close this issue.