Skip to content

Formatter: Dangling > and odd formatting for html tags with lengthy / multiple attributes #928

Description

@ron-shinall

I'm not sure if the formatting is intentional, but I wanted to document it just in case. Formatting html tags with lengthy and/or multiple attributes produces unexpected results.

Input:

<div class="bg-white border-l-4 shadow-lg rounded-lg p-6 mb-6" role="alert" style="border-left-color: #B9D400; background-color: #F0F8E8;">

Output:

<div
  class="bg-white border-l-4 shadow-lg rounded-lg p-6 mb-6"
  role="alert"
  style="border-left-color: #B9D400; background-color: #F0F8E8;"
>

Expected:

<div class="bg-white border-l-4 shadow-lg rounded-lg p-6 mb-6" role="alert" style="border-left-color: #B9D400; background-color: #F0F8E8;">

...or possibly:

<div class="bg-white border-l-4 shadow-lg rounded-lg p-6 mb-6" role="alert" 
     style="border-left-color: #B9D400; background-color: #F0F8E8;">

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions