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

Possible missing Operator "=>" in the filter filter #163

Open
ppvolto opened this issue Aug 12, 2020 · 2 comments
Open

Possible missing Operator "=>" in the filter filter #163

ppvolto opened this issue Aug 12, 2020 · 2 comments

Comments

@ppvolto
Copy link

ppvolto commented Aug 12, 2020

Explain the problem

I started to use prettier-plugin-twig-melody to check my twig templates
and found that melody do not recognize the => Operator like it's used in the filter filter.

Expected Behaviour

Usage of the => operator like described in the filter filter.

Actual Behaviour

Throws Error:

ERROR in ./src/home/index.twig
ERROR: Unexpected token "operator" of value ">"
  16 |     {% mount '../counter' with { count: 5 } %}
  17 |     {% set sizes = [34, 36, 38, 40, 42] %}
> 18 |     {{ sizes|filter(v => v > 38)|join(', ') }}
     |                        ^
  19 | </div>
@gregkohn
Copy link

gregkohn commented Jun 4, 2021

Having the same problem, any chance this can be added as a token?

@jeroenbraspenning
Copy link

Has anyone found a way to solve this? i'm experiencing the same issue.

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

3 participants