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

Allow tags in attributes #169

Open
Khartir opened this issue Feb 19, 2021 · 2 comments
Open

Allow tags in attributes #169

Khartir opened this issue Feb 19, 2021 · 2 comments

Comments

@Khartir
Copy link

Khartir commented Feb 19, 2021

Explain the problem

Currently the parser does not allow tags in attributes. Valid Twig-Code like <option {% if disabled %}disabled{% endif %}> is not possible.

Expected Behaviour

Allow valid tags in attributes.

This came up in the prettier-plugin: trivago/prettier-plugin-twig-melody#37

Is there a reason for this limitation or this is simply something that has not been implemented yet?

@andyexeter
Copy link

We're currently getting hit by the same issue, it'd be great to know if there are plans to support this at some point :)

As another example, this is failing for us in our base template:

<meta name="description" content="{% block meta_description %}{% endblock %}">

@grzegorzgit
Copy link

Why would this cause a problem? It is most normal and most common thing in the twig files. How can twig formatter failing on this? Seriously?

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