vscode-liquid icon indicating copy to clipboard operation
vscode-liquid copied to clipboard

Formatter forces a newline before closing tags

Open ijlind opened this issue 8 months ago • 0 comments

I'm migrating a 11ty project from nunjucks to liquid and I'm using this plugin for formatting. For some reason though, this plugins formatter will force the closing tags of HTML content to always be on a new line. Is there a config I'm missing?

For example:

<section class="default-container prose">
  <h1>Main Header</h1>
  ...
</section>

→ Will become

<section class="default-container prose">
  <h1>Main Header
  </h1>
  ...
</section>

and

<ul>
  <li>Item 1</li>
  <li>Item 2</li>
  ...
</ul>

→ Will become

<ul>
  <li>Item 1
  </li>
  <li>Item 2
  </li>
  ...
</ul>

I'd understand moving the closing tag to a new line if the tag content would also be on a separate line e.g.

<h1 class="some heading classes">
  This is a really long heading 
</h1>```

ijlind avatar Jun 23 '24 08:06 ijlind