Skip to content
This repository has been archived by the owner on Jun 9, 2018. It is now read-only.

Commit

Permalink
add missing ListContinuationBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
fperrad committed Mar 28, 2009
1 parent 669e593 commit 9f70116
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/parser/actions.pm
Expand Up @@ -190,12 +190,16 @@ method BulletListItem($/) {
}

method ListItem($/) {
my $mast := Markdown::ListItem.new();
$mast.push( $( $<ListBlock> ) );
for $<ListContinuationBlock> {
$mast.push( $( $_ ) );
if ( $<ListContinuationBlock> ) {
my $mast := Markdown::Para.new( $( $<ListBlock> ) );
for $<ListContinuationBlock> {
$mast.push( $( $_ ) );
}
make Markdown::ListItem.new( $mast );
}
else {
make Markdown::ListItem.new( $( $<ListBlock> ) );
}
make $mast;
}

method ListBlock($/) {
Expand All @@ -206,6 +210,15 @@ method ListBlock($/) {
make $mast;
}

method ListContinuationBlock($/) {
my $mast := Markdown::Node.new();
for $<ListBlock> {
$mast.push( Markdown::Word.new( :text( "\n" ) ) );
$mast.push( $( $_ ) );
}
make $mast;
}

method OrderedList($/, $key) {
make $( $/{$key} );
}
Expand Down

0 comments on commit 9f70116

Please sign in to comment.