whitespaceSensitivity
Control the whitespace sensitivity before and after the children of an element. This is similar to Prettier, so you can read its blog for detail.
Possible options:
"css"
: Respect the default value of CSSdisplay
property."strict"
: Whitespace (or the lack of it) around all tags is considered significant."ignore"
: Whitespace (or the lack of it) around all tags is considered insignificant.
Default option is "css"
.
This option can be overridden for Vue, Svelte, Astro and Angular components by the following option:
component.whitespaceSensitivity
Example for "css"
Input:
<div> text </div>
<span> text </span>
Output:
<div>text</div>
<span> text </span>
Example for "strict"
Input:
<div> text </div>
<span> text </span>
Output:
<div> text </div>
<span> text </span>
Example for "ignore"
Input:
<div> text </div>
<span> text </span>
Output:
<div>text</div>
<span>text</span>