|
|
|
@ -36,7 +36,7 @@ sub parse {
|
|
|
|
|
} else { |
|
|
|
|
push @{ $tree }, [code => {class => $attrs->{class}}, 0 => $buf]; |
|
|
|
|
} |
|
|
|
|
($buf, $attrs, $mode) = ('', {}, undef); next; |
|
|
|
|
($buf, $mode, $attrs) = ('', '', {}); next; |
|
|
|
|
} |
|
|
|
|
$buf .= $line . "\n"; |
|
|
|
|
} |
|
|
|
@ -45,7 +45,7 @@ sub parse {
|
|
|
|
|
$buf .= $line . "\n"; next; |
|
|
|
|
} else { |
|
|
|
|
push @{ $tree }, [pre => {}, 0 => $buf]; |
|
|
|
|
($buf, $attrs, $mode) = ('', {}, undef); continue; |
|
|
|
|
($buf, $mode, $attrs) = ('', '', {}); continue; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
when ("list") { |
|
|
|
@ -54,7 +54,7 @@ sub parse {
|
|
|
|
|
next; |
|
|
|
|
} else { |
|
|
|
|
push @{ $tree }, [ul => {}, @$buf]; # TODO: lost list type |
|
|
|
|
($buf, $attrs, $mode) = ('', {}, undef); continue; |
|
|
|
|
($buf, $mode, $attrs) = ('', '', {}); continue; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
when ("table") { |
|
|
|
@ -115,7 +115,7 @@ sub parse {
|
|
|
|
|
# empty lines; |
|
|
|
|
when (m/^\s*$/) { |
|
|
|
|
push @{ $tree }, [br => {}]; |
|
|
|
|
$mode = undef; |
|
|
|
|
$mode = ''; |
|
|
|
|
next; |
|
|
|
|
} |
|
|
|
|
# catchall |
|
|
|
|