Closed newhoggy closed 3 years ago
Similarly for spaces.
This has been requested multiple times via various channels, and I’m not a fan of it.
On a code level, it would be quite complicated, and thus only pitfall-heavy, probably changing the Doc
type.
collapseToMaxEmptyLines 1
?line <> collapseLine
, collapseLine <> line
?collapseLine <> ann "test" collapseLine
do? Print a (maybe surprising) empty line, or silently discard an annotation?Produce your documents with concatWith
, and insert the desired amount of lines between manually. Don’t use the layouter to clean up your Doc
, but rather create it in a way it doesn’t have to.
Thanks for you advice and suggestions!
Is it possible to add a special kind of newline whereby if there were more than one consecutive such newline they will be squashed into one?