Search code examples
performancewebstormreformat

WebStorm after reformat code - what is this?


This is my HTML structure:

<ul class="list-unstyled">
      <li><a href="#">Superga</a></li>
      <li><a href="#">Nike</a></li>
      <li><a href="#">New Balance</a></li>
      <li><a href="#">Birkenstock</a></li>
      <li><a href="#">Havaianas</a></li>
      <li><a href="#">Punto</a></li>
      <li><a href="#">Marjin</a></li>
      <li><a href="#">Puma</a></li>
</ul>

When I use WebStorm's reformat code (Alt + Command + L), it changes to:

<ul class = "list-unstyled" >
      <li ><a href = "#" >Superga</a ></li >
      <li ><a href = "#" >Nike</a ></li >
      <li ><a href = "#" >New Balance</a ></li >
      <li ><a href = "#" >Birkenstock</a ></li >
      <li ><a href = "#" >Havaianas</a ></li >
      <li ><a href = "#" >Punto</a ></li >
      <li ><a href = "#" >Marjin</a ></li >
      <li ><a href = "#" >Puma</a ></li >
</ul >

Why does it do this. Why is there blank space between the attribute string and the tags?


Solution

  • Settings | Editor | Code Style | HTML, Other, Spaces, "Around "=" in attribute" and "After tag name"

    See the comment above