-
Notifications
You must be signed in to change notification settings - Fork 33
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
Unexpected macro syntax violation #170
Labels
Comments
Hi, Good catch! This would need to be fixed and then added to our test suite. |
I have a similar case where html code seems to be detected as twig the <!-- overlay -->
<div id="{{ id }}" class="relative z-10 hidden" role="dialog" aria-modal="true">
<div class="fixed inset-0 bg-black bg-opacity-50 transition-opacity cursor-default"
data-controller="expander"
data-action="click->expander#close"
aria-controls="{{ id }}"
aria-expanded="false"></div>
<div class="fixed z-10 w-screen sm:w-[85vw] max-w-screen-md bottom-0 sm:bottom-auto sm:top-1/2 left-1/2 -translate-x-1/2 sm:-translate-y-1/2 bg-white rounded-t-lg sm:rounded-lg shadow-lg">
<div class="absolute top-0 right-4 pt-4 pl-2 pb-2 bg-white rounded-bl-xl">
<button type="button" class="bg-white rounded-md text-primary-600 hover:text-primary-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500"
data-controller="expander"
data-action="expander#close"
aria-controls="{{ id }}"
aria-expanded="false">
<span class="sr-only">{{ 'app.close'|trans }}</span>
{{ include('website/atoms/icons/outline/x.html.twig', {class: 'h-6 w-6'}) }}
</button>
</div>
<div class="max-h-[90vh] sm:max-h-[85vh] overflow-y-auto p-5 pt-8 sm:p-10 overscroll-y-contain">
{% if title|default %}
<h3 class="text-2xl leading-8 font-bold text-slate-600 mb-10">{{ title }}</h3>
{% endif %}
<div>
{% block content %}{% endblock %}
</div>
</div>
</div>
</div>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Twig documentation, there are space surrounding the
=
operator in macro declarations.Problem is that this syntax is reported as errored by the rule responsible to check named arguments declaration.
Macro declaration:
Error reported:
l.1 c.25 : ERROR There should be 0 space before the "=" in the named arguments list.
The text was updated successfully, but these errors were encountered: