diff --git a/lib/Text/Dokuwiki/Parser.pm b/lib/Text/Dokuwiki/Parser.pm index de71a7f..e264acf 100644 --- a/lib/Text/Dokuwiki/Parser.pm +++ b/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";