|
|
|
@ -284,24 +284,24 @@ sub parse {
|
|
|
|
|
# nowiki block |
|
|
|
|
$mode = "block/nowiki"; |
|
|
|
|
next; |
|
|
|
|
} elsif ($line = m/^(\s{2})+([\*-])\s+(.+)/o) { |
|
|
|
|
} elsif ($line =~ m/^(\s{2})+([\*-])\s+(.+)/o) { |
|
|
|
|
# lists |
|
|
|
|
$mode = 'list'; |
|
|
|
|
$buf = []; |
|
|
|
|
push @{ $buf }, $line; |
|
|
|
|
next; |
|
|
|
|
} elsif ($line = m/^\s?(>)+\s*(.+)/o) { |
|
|
|
|
} elsif ($line =~ m/^\s?(>)+\s*(.+)/o) { |
|
|
|
|
# quotes |
|
|
|
|
my $level = $1 =~ tr/>/>/; |
|
|
|
|
push @tree, [blockquote => {level => $level}, $2]; |
|
|
|
|
next; |
|
|
|
|
} elsif ($line = m/^\s?[\|\^]/o) { |
|
|
|
|
} elsif ($line =~ m/^\s?[\|\^]/o) { |
|
|
|
|
# table |
|
|
|
|
$mode = 'table'; |
|
|
|
|
$buf = []; |
|
|
|
|
push @{ $buf }, $line; |
|
|
|
|
next; |
|
|
|
|
} elsif ($line = m/^\s{2}(\S.+)/o) { |
|
|
|
|
} elsif ($line =~ m/^\s{2}(\S.+)/o) { |
|
|
|
|
# code idented with two spaces |
|
|
|
|
$mode = 'code'; |
|
|
|
|
$buf = $line . "\n"; |
|
|
|
|