Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

maxInlineTagWidth

Maximum width of a tag (including attributes) before the formatter wraps attributes or children onto new lines.

Typenumber
Defaultvalue of lineWidth
Minimum1

This is the primary knob for controlling when tags break. When a tag’s total width exceeds this threshold, attributes wrap according to attributeLayout and attributesPerLine.

Example

maxInlineTagWidth: 40

<!-- input -->
<svg><circle cx="50" cy="50" r="25" fill="red" /></svg>
<!-- output -->
<svg>
  <circle
    cx="50"
    cy="50"
    r="25"
    fill="red" />
</svg>

maxInlineTagWidth: 120

<!-- input -->
<svg><circle cx="50" cy="50" r="25" fill="red" /></svg>
<!-- output -->
<svg>
  <circle cx="50" cy="50" r="25" fill="red" />
</svg>

Config

{
  "svg": {
    "maxInlineTagWidth": 80
  }
}