lemminx icon indicating copy to clipboard operation
lemminx copied to clipboard

Format: closing bracked on newline fails with inner text

Open 3xau1o opened this issue 8 months ago • 0 comments

If a xml tag has plain text inside, the closing bracket is inlined instead of setting it on a new line

Current format

<text x="50%"
      y="50%"
      font-size="60"
      > SVG </text>  <!-- Should be newline -->

Desired format

<text x="50%"
      y="50%"
      font-size="60"
      > 
      SVG 
</text>

settings xml.format.closingBracketNewLine is already enabled

{
    "editor.linkedEditing": true,
    "[xml]": {
        "editor.defaultFormatter": "redhat.vscode-xml",
        "editor.tabSize": 2,
        "files.trimTrailingWhitespace": true,
        "files.trimFinalNewlines": true
    },
    "xml.format.preserveEmptyContent": true,
    "xml.format.emptyElements": "collapse",
    "xml.format.splitAttributes": "alignWithFirstAttr",
    "xml.completion.autoCloseTags": true,
    "xml.format.spaceBeforeEmptyCloseTag": true,
    "xml.format.closingBracketNewLine": true,
    "xml.preferences.quoteStyle": "double",
    "xml.fileAssociations": [
        {
            "pattern": "**/*.xml.svg",
            "systemId": ".vscode/svg11-flat-20110816.dtd"
        }
    ],
    "html.autoClosingTags": true,
}

3xau1o avatar Jun 18 '24 02:06 3xau1o