Bogus 'closing tag matches nothing' warning
Answered
This valid TWIG file produces exactly what it's supposed to (in the application and in https://twigfiddle.com/), but for some reason PHPStorm is unable to figure out that the <a>...</a> tags are matched, and emits "⚠️ Closing tag matches nothing :5" in the Problems panel.
<div {{ attributes }}>
<nav class="action-links">
{% for action in actions %}
{# Ignore 'Closing tag matches nothing' warning. It is bogus and there's no way to turn it off in PHPStorm. #}
<a href="{{ action.url }}" class="button usa-button button-action"{% for name, value in action.attributes %} {{ name }}="{{ value }}"{% endfor %}>{{ action.label }}</a>
{% endfor %}
</nav>
</div>
Please sign in to leave a comment.
That's a known issue: https://youtrack.jetbrains.com/issue/WI-12455 - please vote for it in order to get notified about its updates & increase its priority.