Browse Source

* fix warning

master
Zubrikhin Alexey 10 years ago
parent
commit
465309ee72
  1. 7
      lib/Text/Dokuwiki/Parser.pm

7
lib/Text/Dokuwiki/Parser.pm

@ -233,14 +233,15 @@ sub parse {
$linenum++;
if ($mode =~ m!block/(file|code|nowiki)!o) {
my $tag = $1;
$buf ||= [];
if ($line =~ m{^\s*</$1>}o) {
if ($line =~ m{^\s*</$tag>}o) {
$buf = join("\n", @{ $buf });
if ($1 eq 'file') {
if ($tag eq 'file') {
my $dt = [dt => {}, $attrs->{file}];
my $dd = [dt => {}, [pre => {class => $attrs->{class}}, $buf]];
push @tree, [dl => {class => 'file'}, [$dt, $dd]];
} elsif ($1 eq 'nowiki') {
} elsif ($tag eq 'nowiki') {
push @tree, [pre => {}, $buf];
} else {
push @tree, [code => {class => $attrs->{class}}, $buf];

Loading…
Cancel
Save