Subject: | wiki text: ordered and unordered lists started in the middle of the line |
Ordered and unordered lists can be started in the middle of the line, for example, with a line like
download is simon_1.tgz foo bar
this patch requires a newline and space only before a number or a * for an ol or ul
--- SAX.pm.back 2003-07-01 13:15:23.000000000 -0700
+++ SAX.pm 2003-07-01 13:18:43.000000000 -0700
@@ -108,7 +108,7 @@
foreach my $line (split(/\n/, $text)) {
if ($line =~ /$indent(.*)$/) {
my $match = $1;
- if ($match =~ /([0-9]+)\.\s*(.*)$/) { #[\dA-Za-z]+
+ if ($match =~ /^\s*([0-9]+)\.\s*(.*)$/) { #[\dA-Za-z]+
# ordered list
my $value = $1;
my $data = $2;
@@ -125,7 +125,7 @@
$self->parent->end_element(_element('listitem', 1));
$self->parent->characters({Data => "\n"});
}
- elsif ($match =~ /\*\s*(.*)$/) {
+ elsif ($match =~ /^\s*\*\s*(.*)$/) {
# bulleted list
my $data = $1;
if ($self->{in_list} ne 'itemized') {