|
|
|
@ -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]; |
|
|
|
|