razor_attribute_indent_style
With curb_razor_format_markup, where an attribute that starts a line inside a start tag goes. Microsoft's Razor formatter reads the same key.
| Value | Notes |
|---|---|
align_with_first |
|
indent_by_one |
|
indent_by_two |
Default: align_with_first
Microsoft's Razor formatter reads the same key with the same values, so one setting serves both. It only applies with curb_razor_format_markup. A line inside a start tag that begins with its > or /> goes where the tag's line does, C# continuing an attribute's value moves as far as the tag's line moved, and text continuing a quoted value is kept as written, since its whitespace is part of the value. With nothing after the tag's name on its line, align_with_first puts attributes a level in; Microsoft's formatter, and curb_razor_markup_engine_quirks, align them with the tag instead. The examples here are at indent_size = 2.
razor_attribute_indent_style = align_with_first
<div>
<button class="btn btn-primary" type="button"
@onclick="Save"
disabled="@busy">
Save
</button>
<InputText
@bind-Value="name"
placeholder="Name" />
</div>
<div>
<button class="btn btn-primary" type="button"
@onclick="Save"
disabled="@busy">
Save
</button>
<InputText
@bind-Value="name"
placeholder="Name" />
</div>
razor_attribute_indent_style = indent_by_one
<div>
<button class="btn btn-primary" type="button"
@onclick="Save"
disabled="@busy">
Save
</button>
<InputText
@bind-Value="name"
placeholder="Name" />
</div>
<div>
<button class="btn btn-primary" type="button"
@onclick="Save"
disabled="@busy">
Save
</button>
<InputText
@bind-Value="name"
placeholder="Name" />
</div>
razor_attribute_indent_style = indent_by_two
<div>
<button class="btn btn-primary" type="button"
@onclick="Save"
disabled="@busy">
Save
</button>
<InputText
@bind-Value="name"
placeholder="Name" />
</div>
<div>
<button class="btn btn-primary" type="button"
@onclick="Save"
disabled="@busy">
Save
</button>
<InputText
@bind-Value="name"
placeholder="Name" />
</div>