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

constant: No text for TestConstantExpression defined #93

Open
Miras4207 opened this issue Dec 27, 2021 · 0 comments
Open

constant: No text for TestConstantExpression defined #93

Miras4207 opened this issue Dec 27, 2021 · 0 comments

Comments

@Miras4207
Copy link

It seems this plugin does handle constant function correctly.

The following example code:

{% if post.status is constant('Post::PUBLISHED') %}
    the status attribute is exactly the same as Post::PUBLISHED
{% endif %}

is incorrectly changed to:

{% if post.status is (Post::PUBLISHED) %}
    the status attribute is exactly the same as Post::PUBLISHED
{% endif %}

Prettier command outputs the following message:

TestExpression: No text for TestConstantExpression defined

Versions used:
Prettier 2.5.1
prettier-plugin-twig-melody 0.4.6

Any help with this topic would be much appreciated.
Thank you.

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

1 participant