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

Prevent adding block name to endblock #22

Closed
zebapy opened this issue Jan 16, 2020 · 3 comments
Closed

Prevent adding block name to endblock #22

zebapy opened this issue Jan 16, 2020 · 3 comments

Comments

@zebapy
Copy link

zebapy commented Jan 16, 2020

I see endblock is getting the opening block name appended after it like so

{% block layout_header %}
  {% include 'partials/school-header.twig' %}
{% endblock layout_header %}

I prefer NOT having the closing name

{% block layout_header %}
  {% include 'partials/school-header.twig' %}
{% endblock  %}

Is there a way to control this? I didn't see it as part of the twig coding standards.

@twbartel
Copy link
Collaborator

Thanks for your input. I agree, it does not always look good to have the name repeated there.

I have added an option twigOutputEndblockName and set its default to false. You should now not get the block name in the endblock tag any more.
Please upgrade to v0.3.0.

@zebapy
Copy link
Author

zebapy commented Jan 21, 2020

Whoa thanks for the fast implementation! 👍 👍 0.3.0 works great.

@zebapy zebapy closed this as completed Jan 21, 2020
@twbartel
Copy link
Collaborator

You're welcome! Glad to hear it works.

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