Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comma breaks parser #902

Open
rafipiccolo opened this issue Nov 13, 2024 · 1 comment
Open

comma breaks parser #902

rafipiccolo opened this issue Nov 13, 2024 · 1 comment

Comments

@rafipiccolo
Copy link

when i add this comma before the last ")" twig breaks and renders nothing. white page.
twig php does support this comma.

{% set motifs = motifs|merge(
    [
        {id: 'blabla'},
    ], {# <====  this comma is the issue #}
) %}

The comma gets added because of a linting rule that i apparently can't disable.
VincentLanglet/Twig-CS-Fixer#328

is there any chance of this to be supported ?

@willrowe
Copy link
Collaborator

There are some issues with multi-line arrays/maps that could also be causing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants