Skip to content

[Feature]: Configurable whitespace handling for xml #1790

@belav

Description

@belav

Description

There should be a few options for how to handle whitespace in xml files

  1. strict/preserve - what is currently implemented. Whitespace at the beginning/end of text content cannot be modified
  2. xaml - there are specific rules for how whitespace is handled in xaml files. Default for xaml files. This also needs to respect the attribute that can be used in xaml to preserve whitespace.
  3. non-strict - will allow better formatting for csproj/props and files where whitespace at the beginning/end of text content is not considered. Ensure this is true for csproj/props files.

TBD - should strict or non-strict be the default whitespace handling for unknown types of xml files

.csharpierrc and .editorconfig should allow this to be configured based on a path glob. IE **/*.xaml is going to default to xaml formatting. Etc.

StrictWhitespace has some inconsistencies with when > ends up on a new line. Get those to all work consistently.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions