Skip to content

Provide an option for empty / self-closing tags in any XML-based language #75607

Open

Description

Summary

Offer a setting to set whether auto-completion should always include a whitespace prior to /> in any XML-based empty / self-closing / standalone tag, e.g.:

  • <br /> instead of <br/>
  • <see cref="string.Empty" /> instead of <see cref="string.Empty"/>
  • <Customers /> instead of <Customers/>

Background and Motivation

Def file a suggestion. It seems out of scope of this issue. Thanks :)

Originally posted by @CyrusNajmabadi in #66719

Proposed Feature

As discussed earlier, it'll be more than awesome, if there's a setting to control how auto-completion handles empty / self-closing / standalone tags.

Alternative Designs

Doing it manually. Like the last 10 years since I switch to Visual Studio.
Or switch to VS Code, because its text editor, at least for HTML, does format a typed <br/> as <br /> (tried just now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions