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
$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";

Loading…
Cancel
Save