Closed Inspyro closed 6 years ago
Note: The call gets formatted like that only if the C# Formatting settings are configured to include a space before the opening parentheses. The bug is therefore not the space per se, it is that the space is inserted while pasting even though format on paste is off (for both C# and HTML Text Editor settings).
@ToddGrun can you take a look?
TFS Bug#362027
Razor formatting has been improved in the most recent version of Visual Studio. We can no longer reproduce this issue.
When disabling format on paste for C# + HTML in the Visual Studio settings, usually code does not get formatted on paste (as expected)
In razor files, when you copy and past something like this statement:
it also works as intended.
However when you mark the "." (dot) and do something like cut (Ctlr+X) and paste (Ctlr+V) (or just paste), the html helper call gets formatted (in our case like this):
This is unexpected and even leads to a compile failure (razor @ syntax does not support whitespaces)