redhat-developer / vscode-xml

Editing XML in Visual Studio Code made easy
Eclipse Public License 2.0
262 stars 82 forks source link

Format: prevent text only content to be inlined with closing tag #1012

Open 3xau1o opened 5 months ago

3xau1o commented 5 months ago

A way to prevent formatting this

<text x="50%"
      y="50%"
      font-size="60"
      text-anchor="middle"
      dominant-baseline="middle"
      fill="white">
      SVG 
</text>

To become

      <text x="50%"
            y="50%"
            font-size="60"
            text-anchor="middle"
            dominant-baseline="middle"
            fill="white"> SVG </text>

Grabación de pantalla desde 2024-06-17 19-53-18.webm

angelozerr commented 5 months ago

To be honnest with you, I don't remember the full features of our XML formatter, have you tried settings defined at https://github.com/redhat-developer/vscode-xml/blob/main/docs/Formatting.md?

angelozerr commented 5 months ago

@utenma have you tested this settings https://github.com/redhat-developer/vscode-xml/blob/main/docs/Formatting.md#xmlformatpreservespace ?

3xau1o commented 5 months ago

The issue is xml.format.closingBracketNewLine could not prevent inline text content work with any other setting as long that one is enabled