From 9f7011673a26ba097f354eb16a7c191bb85e2c68 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Sat, 28 Mar 2009 18:32:23 +0100 Subject: [PATCH] add missing ListContinuationBlock --- src/parser/actions.pm | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/parser/actions.pm b/src/parser/actions.pm index 7973b18..85e9ec2 100644 --- a/src/parser/actions.pm +++ b/src/parser/actions.pm @@ -190,12 +190,16 @@ method BulletListItem($/) { } method ListItem($/) { - my $mast := Markdown::ListItem.new(); - $mast.push( $( $ ) ); - for $ { - $mast.push( $( $_ ) ); + if ( $ ) { + my $mast := Markdown::Para.new( $( $ ) ); + for $ { + $mast.push( $( $_ ) ); + } + make Markdown::ListItem.new( $mast ); + } + else { + make Markdown::ListItem.new( $( $ ) ); } - make $mast; } method ListBlock($/) { @@ -206,6 +210,15 @@ method ListBlock($/) { make $mast; } +method ListContinuationBlock($/) { + my $mast := Markdown::Node.new(); + for $ { + $mast.push( Markdown::Word.new( :text( "\n" ) ) ); + $mast.push( $( $_ ) ); + } + make $mast; +} + method OrderedList($/, $key) { make $( $/{$key} ); }