Open TrofinSorin opened 8 months ago
These options will work:
{
selectors: [
{ selector: 'h1', options: { leadingLineBreaks: 1, trailingLineBreaks: 1 } },
]
}
What happens with zero:
The condition 0 || 2
equates to the default value of 2.
Notice that this counts line breaks, not empty lines. Zero line breaks would mean "continue on the same line" which doesn't make sense for block level tags.
I agree that this logic might be somewhat less intuitive though. It should probably be clamped to the closest valid value and sent a warning when misused...
Minimal HTML example
Options
Observed output Before the selector options there were 2 newlines. But with those options it's reduced to one newline.
1 (newline here) 2 (newline here) 3
Expected output
Version information