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

Commit

Permalink
clean up actions
Browse files Browse the repository at this point in the history
  • Loading branch information
fperrad committed Jun 3, 2009
1 parent cd19163 commit 38b5f8f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/parser/actions.pm
Expand Up @@ -44,7 +44,7 @@ method Heading($/, $key) {
}

method AtxHeading($/) {
my $mast := Markdown::Title.new( :level( ~$<AtxStart>.length() ) );
my $mast := Markdown::Title.new( :level( $<AtxStart>.length() ) );
for $<AtxInline> {
$mast.push( $_.ast() );
}
Expand Down Expand Up @@ -131,15 +131,15 @@ method BlockQuoteNextLine($/) {
}

method Line($/) {
make Markdown::Line.new( :text( ~$<RawLine>[0] ) );
make Markdown::Line.new( :text( $<RawLine>[0].Str() ) );
}

method BlankLine($/) {
make Markdown::Newline.new( :text( $/.Str() ) );
}

method NonblankIndentedLine($/) {
make Markdown::Line.new( :text( ~$<IndentedLine><Line><RawLine>.Str() ),
make Markdown::Line.new( :text( $<IndentedLine><Line><RawLine>.Str() ),
:detab( 1 ) );
}

Expand Down Expand Up @@ -319,7 +319,7 @@ method ReferenceLink($/, $key) {
}

method ReferenceLinkDouble($/) {
my $mast := Markdown::RefLink.new( :key( ~$<Label>[1].Str() ),
my $mast := Markdown::RefLink.new( :key( $<Label>[1].Str() ),
:text( $/.Str() ) );
for $<Label>[0]<Inline> {
$mast.push( $_.ast() );
Expand All @@ -328,13 +328,13 @@ method ReferenceLinkDouble($/) {
}

method ReferenceLinkSingle($/) {
make Markdown::RefLink.new( :key( ~$<Label>.Str() ),
make Markdown::RefLink.new( :key( $<Label>.Str() ),
:text( $/.Str() ) );
}

method ExplicitLink($/) {
my $mast := Markdown::Link.new( :title( ~$<Title>[0].Str() ),
:url( ~$<Source><SourceContents>.Str() ) );
my $mast := Markdown::Link.new( :title( $<Title>[0].Str() ),
:url( $<Source><SourceContents>.Str() ) );
for $<Label><Inline> {
$mast.push( $_.ast() );
}
Expand All @@ -357,7 +357,7 @@ method AutoLinkEmail($/) {

method Reference($/) {
my $mast := Markdown::Reference.new( );
$mast.insert( ~$<Label>.Str(), ~$<RefSrc>.Str(), ~$<RefTitle>[0].Str() );
$mast.insert( $<Label>.Str(), $<RefSrc>.Str(), $<RefTitle>[0].Str() );
make $mast
}

Expand Down

0 comments on commit 38b5f8f

Please sign in to comment.