print << "END"; END while (<>) { chomp; if (/^(\s*)\*+(.*)$/) { $lev = (length($1))/2 + 1; print "$2\n"; } elsif (! /\S/) { print "
 
\n"; } elsif (/^\#/) { print "$_
\n"; } else { print; } } print << "END" END