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

blankLines

Control blank lines between sibling elements.

Type"remove" | "preserve" | "truncate" | "insert"
Default"truncate"

Values

"remove"

Strip all blank lines between siblings:

<!-- input -->
<svg>
  <text>total visits</text>

  <!--Legend-->
  <g transform="translate(46, 248)"></g>
</svg>
<!-- output — all gaps removed -->
<svg>
  <text>total visits</text>
  <!--Legend-->
  <g transform="translate(46, 248)"></g>
</svg>

"preserve"

Keep blank lines from source verbatim (0, 1, or 3 — all kept):

<!-- input -->
<svg>
  <text>total visits</text>



  <!--Legend-->
</svg>
<!-- output — triple gap kept -->
<svg>
  <text>total visits</text>



  <!--Legend-->
</svg>

"truncate" (default)

Collapse 2+ blank lines to exactly 1:

<!-- input -->
<svg>
  <text>total visits</text>



  <!--Legend-->
  <g></g>
</svg>
<!-- output — triple gap collapsed to single -->
<svg>
  <text>total visits</text>

  <!--Legend-->
  <g></g>
</svg>

"insert"

Force exactly 1 blank line between every sibling element, even if the source had no gap:

<!-- input -->
<svg>
  <text>total visits</text>
  <!--Legend-->
  <g></g>
</svg>
<!-- output — gaps inserted everywhere -->
<svg>
  <text>total visits</text>

  <!--Legend-->

  <g></g>
</svg>

Config

{
  "svg": {
    "blankLines": "truncate"
  }
}