- " while $ul++
- " if $stars or $hashes;
$line .= "
\n
" if !defined($compact); print "$line"; $stars = $hashes = undef; } print "
- " while $ol++
\1<\/pre>/msg;
}
$body=join('',@chunks);
print "\n$title
\n\n";
print "\n";
$ul = 0;
$ol = 0;
foreach $line (split("\n",$body)) {
($stars,$line) = ($line =~ /(?:(\*+)\s*)?(.*)/);
print "" while $ul++" while --$ul>length($stars);
($hashes,$line) = ($line =~ /(#*)(.*)/);
print "" while $ol++" while --$ol>length($hashes);
print "- " if $stars or $hashes;
$line .= "
\n
" if !defined($compact);
print "$line";
$stars = $hashes = undef;
}
print "
\n" while $ul-->0;
print "\n" while $ol-->0;
print "\n\n