END_HTML ); }
sub line_break { my $self = shift; $self->_stream("\n\n"); }
sub html_entity { my $self = shift; my ($entity) = validated_list( \@_, entity => { type => 'Str' } );
$self->_stream("E<$entity>"); }
# Added A.Speer sub horizontal_rule { my $self = shift; $self->_stream( ( '=' x $HORIZONTAL_RULE_WIDTH ) . "\n" ); }
sub auto_link { my $self = shift; my ($uri) = validated_list( \@_, uri => { type => 'Str' } ); $self->_stream("$uri"); }
sub html_comment_block { my $self = shift; # Stub }
sub start_table { my $self = shift; # Stub }
sub start_table_body { my $self = shift; # Stub }
sub start_table_row { my $self = shift; # Stub }
sub start_table_cell { my $self = shift; push @style_stack, STACK_TBLE; $tble_buf = {}; }
sub end_table { my $self = shift; eval { require Text::Table::Tiny; 1; } || die('unable to load Text::Table::Tiny - please make sure it is installed !'); my $table = Text::Table::Tiny::table( rows => \@tble, separate_rows => 0, header_row => 0 ); # Indent so table appears as POD code. Open to other suggestions $table =~ s/^(.*)/ $1/mg; $table .= "\n"; # Safety in case parser skips end-cell - which it seems to do sometimes pop @style_stack; $tble_buf = undef; $self->_stream($table); }
sub end_table_body { my $self = shift; # Safety pop @style_stack; $tble_buf = undef; }
sub end_table_row { my $self = shift; push @tble, []; # Safety pop @style_stack; $tble_buf = undef; }
sub end_table_cell { my $self = shift; push @{ $tble[$#tble] }, $tble_buf->{'text'}; # Stop buffering table text pop @style_stack; $tble_buf = undef; }
__PACKAGE__->meta->make_immutable; no Moose; 1;
__END__
Markdown::Pod::Handler - Parser module to convert from markdown to POD
version 0.008
my $handler = Markdown::Pod::Handler->new( encoding => $encoding, output => $fh, ); my $parser = Markdent::Parser->new( dialect => $dialect, handler => $handler, );
This module is a handler of Markdent Markdown parser. It converts Markdown to POD.
markdown text
encoding to use
create Markdown::Pod::Handler object
convert markdown text to POD text
Markdent
Pod::Markdown
Text::MultiMarkdown, Text::Markdown
김도형 - Keedi Kim <keedi@cpan.org>
This software is copyright (c) 2021 by Keedi Kim.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Markdown::Pod, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Markdown::Pod
CPAN shell
perl -MCPAN -e shell install Markdown::Pod
For more information on module installation, please visit the detailed CPAN module installation guide.