blade-parser-typescript icon indicating copy to clipboard operation
blade-parser-typescript copied to clipboard

`a` tag gets indented too far inside a `@if` tag

Open RobertBlaauwendraad opened this issue 1 year ago • 1 comments

With

[*.blade.php]
indent_size = 2

This correctly indented snippet:

 @if ($hasWhatsappButton)
   <a
     href="{{ get_field('whatsapp_contact_link', 'option') }}"
     target="_blank"
     class="btn--contact bg-whatsapp"
   >
     <i class="icon icon-whatsapp"></i>
   </a>
 @endif

Becomes:

  @if ($hasWhatsappButton)
      <a
        href="{{ get_field('whatsapp_contact_link', 'option') }}"
        target="_blank"
        class="btn--contact bg-whatsapp"
      >
        <i class="icon icon-whatsapp"></i>
      </a>
  @endif

RobertBlaauwendraad avatar Aug 09 '24 09:08 RobertBlaauwendraad

I am unable to reproduce with a prettierrc or .format.json.file. Can you provide the configuration files you are using?

Thanks

JohnathonKoster avatar Aug 09 '24 14:08 JohnathonKoster