Refactoring CSHTML doesn't match CS

When I do a code cleanup on a CS file the output is:

var value = "foo";
switch (value)
 {
      case "bar":
           value = "foo";
           break;

     case "foo":
           value = "bar";
           break;
 }



but when I do a code cleanup on a CSHTML file it turns out like this.

var value = "foo";

@switch (value)
 {
      case "bar":
      @:foo
      break;

      case "foo":
      @:bar
      break;
 }



I've search for any setting to fix this but I cannot seem to find any setting to correct it. What I want is this.


@switch (value)
{
     case "bar":
          @:foo
          break;

     case "foo":
          @:bar
          break;
}

Thanks for any help.

0
1 comment
Avatar
Permanently deleted user

Hello Bobby,

Thank you for reporting this problem! At the moment there are no separate
code style options for cshtml files, so I've logged this problem as a bug
at http://youtrack.jetbrains.net/issue/RSRP-273836 as well.

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

When I do a code cleanup on a CS file the output is:

var value = "foo";
switch (value)
{
case "bar":
value = "foo";
break;
case "foo":
value = "bar";
break;
}
but when I do a code cleanup on a CSHTML file it turns out like this.

var value = "foo";

@switch (value)
{
case "bar":
@:foo
break;
case "foo":
@:bar
break;
}
I've search for any setting to fix this but I cannot seem to find any
setting to correct it. What I want is this.

@switch (value)
{
case "bar":
@:foo
break;
case "foo":
@:bar
break;
}
Thanks for any help.

---
Original message URL:
http://devnet.jetbrains.net/message/5308924#5308924



0

Please sign in to leave a comment.