One of the great mysteries in life is why our HTML is so poorly formatted - but
for some exceptions, like lists and the ToC. And why the Runestone manifest,
output as XML, is so pretty. Well, it is one of the great mysteries in *my* life.
Not any more. If the XSL for HTML has a literal <ol> followed by some
whitespace, the HTML that is output can "see" that whitespace and clean things
up, including putting opening and closing tags on their own line. If the XSL
has <xsl:element name="ol">, there is no whitespace output and no opportunity to
manage line breaks. Thanks, Claude.
So now we have 21 instances of strategic additional newlines for block content
like #article and #section, so much of their block content is now on their own
lines, and much more readable. No indentation, it seems that simply is not
available. Things like the contents of a #p are still one long line, but that
is appropriate for mixed content (not structural, not block-level). Big payoff
fpr developers: diffs on before/after HTML should improve, especially when
dealing with the more structural aspects of the HTML output.
For more precise details, see:
https://github.com/PreTeXtBook/pretext/pull/2813
CSS specialists should be on the lookout for any visual changes. (I'm not
seeing any.) Easy to roll back any of these which may have been too aggresive.
Or we can add more.
Rob