# 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|

()|$1|g; $html =~ s|

\n||sg; $html =~ s|\n\n

|\n

|sg; return $html; }