curb_razor_markup_engine_quirks
Experimental. With curb_razor_format_markup, indent markup by tab_width rather than indent_size, and align attributes with a tag that has none on its line, as Microsoft's Razor formatter does.
| Value | Notes |
|---|---|
true |
|
false |
Default: false
Microsoft's Razor formatter indents by tab_width and ignores indent_size. Curb indents markup by indent_size, as it does C#; this key makes it use tab_width instead, for a repository that wants its Razor files to stay exactly as the IDE formats them. It also follows the IDE where a start tag has no attribute on its own line: under razor_attribute_indent_style = align_with_first the attributes on the lines after it align with the tag, rather than going a level in. The examples here are at indent_size = 2.
curb_razor_markup_engine_quirks = true
<div class="card">
<h3>@Title</h3>
@if (Items.Count > 0)
{
<ul>
@foreach (var item in Items)
{
<li>@item</li>
}
</ul>
}
</div>
<div class="card">
<h3>@Title</h3>
@if (Items.Count > 0)
{
<ul>
@foreach (var item in Items)
{
<li>@item</li>
}
</ul>
}
</div>
curb_razor_markup_engine_quirks = false
<div class="card">
<h3>@Title</h3>
@if (Items.Count > 0)
{
<ul>
@foreach (var item in Items)
{
<li>@item</li>
}
</ul>
}
</div>
<div class="card">
<h3>@Title</h3>
@if (Items.Count > 0)
{
<ul>
@foreach (var item in Items)
{
<li>@item</li>
}
</ul>
}
</div>