Closed rspilker closed 2 years ago
Thank you, merged it into the main branch.
Shouldn't the default of spaceBeforeSelfClose
be handled in the constructor, like all others? (level
, indent
and newLine
)?
level
, indent
and newLine
are literals. preserveWhitespace
, indentAttribute
, sortAttributes
, spaceBeforeSelfClose
are nullable functions. Their default behavior is inlined in the code.
level
,indent
andnewLine
are literals.preserveWhitespace
,indentAttribute
,sortAttributes
,spaceBeforeSelfClose
are nullable functions. Their default behavior is inlined in the code.
Thanks for clarifying. I thought it was just a simple parameter, that it adds a space for all self-closing tags.
But now the most common usage (when you'd like to just add spaces for all tags) is a bit complicated.
Adds a predicate parameter to the pretty printer to insert a space character before self-closing an element.
Fixes #109