Formatting Style in RazorView-Files
Hi
I noticed that I have an issue with the formating of my code in razor view files.
I use the "At end of Line (K&R style)" setting for my bracers layout and setup the align settings to always get something like this
public UnityControllerFactory(IUnityContainer unityContainer) {
if (unityContainer == null) {
throw new ArgumentException();
}
this._unityContainer = unityContainer;
}
I expected to have a similar result when editing razor view files however I get results like that
<table>
@foreach (var instrument in Model.Instruments) {
var contracts = Model.Contracts.Where(c => c.InstrumentId == instrument.Id).ToList();
if (contracts.Count == 0) {
continue;
}
<tr><th>@instrument.Name</th></tr>
foreach (var contract in contracts) {
var member = Model.Members.FirstOrDefault(m => m.Id == contract.MemberId);
<tr><td>@member.Name</td></tr>
}
}
</table>
It seems the statement after the opening brace gets not intended as usually. Is there some way to change this behaviour? In cs files this is working fine.
Please note that I setup a tabstop equals two spaces so it added a lot of tabs which isn't diplayed properly here.
Kind regards,
Sven
Please sign in to leave a comment.
Does anybody else have the same issue?
edit
I have seen this is already tracked http://devnet.jetbrains.net/message/5310918 :)