# The HTML that we've generated may need to be cleaned up. By deferring
# cleanup, the algorithms above can be simpler.
#
sub cleanup_html {
my $html = shift;
$html =~ s|
\n||sg;
$html =~ s|
\n||sg;
$html =~ s|
( |\n |sg;
return $html;
}
\n||sg;
$html =~ s|\n\n