The patch is provided below as a unified diff against UseMod 1.0. It also includes a change from center- to left-justification for table cells, simply because this is a change that I have locally and it touches a single nearby line. You can easily remove that if you like.
-- DanMuller
--- wiki.pl 2005-05-23 15:50:56.000000000 -0400
+++ wiki-ordered-list-numbering-and-table-left.pl 2005-05-27 14:56:53.000000000 -0400
@@ -1711,15 +1711,18 @@
} elsif (s/^(\*+)/<li>/) {
$code = "UL";
$depth = length $1;
- } elsif (s/^(\#+)/<li>/) {
+ } elsif (s/^(\#+)(\d*)([aAiI]?)/'<li' . ($2 ? " VALUE=\"$2\"" : '') . '>'/e) {
$code = "OL";
$depth = length $1;
+ if ($3) {
+ $codeAttributes = " TYPE=\"$3\"";
+ }
} elsif ($TableSyntax &&
s/^((\|\|)+)(.*)\|\|\s*$/"<TR VALIGN='CENTER' "
- . "ALIGN='CENTER'><TD colspan='"
+ . "ALIGN='LEFT'><TD colspan='"
. (length($1)\/2) . "'>$3<\/TD><\/TR>\n"/e) {
$code = 'TABLE';
- $codeAttributes = "BORDER='1'";
+ $codeAttributes = " BORDER='1'";
$TableMode = 1;
$depth = 1;
} elsif (/^[ \t].*\S/) {
@@ -1742,7 +1745,7 @@
}
while (@htmlStack < $depth) {
push(@htmlStack, $code);
- $pageHtml .= "<$code $codeAttributes>\n";
+ $pageHtml .= "<$code$codeAttributes>\n";
}
}
if (!$ParseParas) {