diff --git a/lib/Text/Dokuwiki/Parser.pm b/lib/Text/Dokuwiki/Parser.pm index 25847c3..ca6d655 100644 --- a/lib/Text/Dokuwiki/Parser.pm +++ b/lib/Text/Dokuwiki/Parser.pm @@ -252,11 +252,13 @@ sub parse { push @tree, [code => $attrs, [pre => {}, $+{block}]]; } } elsif ($text =~ m/\G$rx->{table}/cgi) { - push @tree, $self->_parse_table($+{table}); + my $lines = $+{table}; + chomp $lines; + push @tree, $self->_parse_table([ split(/\r?\n/, $lines) ]); } elsif ($text =~ m/\G$rx->{list}/cgi) { - my $list = $+{list}; - chomp $list; - push @tree, $self->_parse_list([ split(/\r?\n/, $list) ]); + my $lines = $+{list}; + chomp $lines; + push @tree, $self->_parse_list([ split(/\r?\n/, $lines) ]); } elsif ($text =~ m/\G$rx->{blockquote}/cgi) { push @tree, [blockquote => {}, $+{block}]; } elsif ($text =~ m/\G$rx->{pre}/cgi) {