Consider removing xml.format.preserveEmptyContent for experimental formatter #1346
Labels
enhancement
New feature or request
formatting
This issue or enhancement is related to formatting support
Milestone
The experimental formatter introduces a new element category called
preserve space
, which preserves all white spaces within the specified element tag. Currently, whenpreserveEmptyContent = true
, it has the same behavior aspreserve space
, making this setting redundant.Note: consider its behavior when used alongside with other settings:
https://github.com/redhat-developer/vscode-xml/blob/main/docs/Formatting.md#xmlformatpreservednewlines
preserveEmptyContent
, it's behavior would be unaffected with the removal ofpreserveEmptyContent
. It formats the xml nicely while allowing the user to set a specified number of new lines they would like to keep.Example:
Before with
preservedNewLines = 2
:After:
https://github.com/redhat-developer/vscode-xml/blob/main/docs/Formatting.md#xmlformatjoincontentlines
xml.format.joinContentLines
instead, which currently has lower priority compared topreserveEmptyContent
and thepreserve space
category.Example:
Before with
joinContentLines = true
andpreserveEmptyContent = false
:After:
The text was updated successfully, but these errors were encountered: