aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 124 forks source link

Automatic Formatting - Line-Breaking after @: in Cshtml #919

Open RandyBuchholz opened 7 years ago

RandyBuchholz commented 7 years ago

Issue

When you have the @: (I don't know what that is called), automatic formatting will sometimes put a line break right after the @:.

Example

@{
    @:<div>
        foreach( item in list){
            @:<div>Output Item Stuff</div>
        }
   @:</div>
}

When editing elsewhere in the doc, when auto formatting kicks in it changes it this to:

@{
    @:<div>
        foreach( item in list){
            @:<div>Output Item Stuff</div>
        }
   @:
</div>
}

which is incorrect, error generating syntax. The formatting also changes if you manually engage formatting (ctrl+k,d).

mlorbetske commented 7 years ago

TFS Bug#362760