﻿---
title: curb_razor_markup_engine_quirks
description: 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. Defaults to `false`
url: https://docs-v3-preview.elastic.dev/reference/razor/code-blocks/curb_razor_markup_engine_quirks
---

# 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.

## Values


| 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`

```ini
curb_razor_markup_engine_quirks = true
```

<tab-set>
  <tab-item title="Before">
    ```html
    <div class="card">
    <h3>@Title</h3>
    @if (Items.Count > 0)
    {
    <ul>
    @foreach (var item in Items)
    {
    <li>@item</li>
    }
    </ul>
    }
    </div>
    ```
  </tab-item>

  <tab-item title="After">
    ```html
    <div class="card">
        <h3>@Title</h3>
        @if (Items.Count > 0)
        {
            <ul>
                @foreach (var item in Items)
                {
                    <li>@item</li>
                }
            </ul>
        }
    </div>
    ```
  </tab-item>
</tab-set>


### `curb_razor_markup_engine_quirks = false`

```ini
curb_razor_markup_engine_quirks = false
```

<tab-set>
  <tab-item title="Before">
    ```html
    <div class="card">
    <h3>@Title</h3>
    @if (Items.Count > 0)
    {
    <ul>
    @foreach (var item in Items)
    {
    <li>@item</li>
    }
    </ul>
    }
    </div>
    ```
  </tab-item>

  <tab-item title="After">
    ```html
    <div class="card">
    <h3>@Title</h3>
    @if (Items.Count > 0)
    {
    <ul>
    @foreach (var item in Items)
    {
    <li>@item</li>
    }
    </ul>
    }
    </div>
    ```
  </tab-item>
</tab-set>