Skip to content

ASP.NET Razor formatter removes duplicate spaces in a string value #8333

Open
@RomanKoff

Description

@RomanKoff

Type: Bug

Issue Description

If you specify multiple spaces in a row in the value of a string variable and apply code formatting, the double spaces will be replaced with a single space. This is unacceptable.

Before:
var s1 = " test test ";

After formating:
var s1 = " test test ";

2025-05-30.13-54-42.mp4

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions