Browse Source

= parse()

master
Alex 'AdUser' Z 10 years ago
parent
commit
0f886920e9
  1. 8
      lib/Text/Dokuwiki/Parser.pm

8
lib/Text/Dokuwiki/Parser.pm

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

Loading…
Cancel
Save