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

twig markup breaks nested blocks #17

Open
jonathan-blimke opened this issue Jul 22, 2021 · 0 comments
Open

twig markup breaks nested blocks #17

jonathan-blimke opened this issue Jul 22, 2021 · 0 comments

Comments

@jonathan-blimke
Copy link

jonathan-blimke commented Jul 22, 2021

When formatting my twig markup like the following it breaks:

 {% block main %}
    <main class="{% block main_classes %} foo {% endblock %}">
       <h1>bar</h1>
    </main>
{% endblock %}

markup after formatting looks like this:
The issue here is, that the class attribute is within a new line after the opening tag

{% block main %}
<main>
    class="{% block main_classes %} foo {% endblock %}"
        <h1>bar</h1>
    </main>
{% endblock %}

Pretty Formatter v0.2.2
pasted from settings.json:
"pretty-formatter.braces": true, "pretty-formatter.braceStyle": "collapse", "pretty-formatter.commentLine": true, "pretty-formatter.styleguide": "airbnb", "pretty-formatter.forceAttribute": true,

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