App-sdview

 view release on metacpan or  search on metacpan

t/11parser-markdown.t  view on Meta::CPAN

   is( $p[2]->text, "code code_with_unders", 'code text' );
   ok( $p[2]->text->get_tag_at( 0, "monospace" ), 'code tag' );

   is( $p[3]->text, "link", 'link text' );
   is( $p[3]->text->get_tag_at( 0, "link" ), { uri => "target://" }, 'link tag' );

   is( $p[4]->text, "strikethrough", 'strikethrough text' );
   ok( $p[4]->text->get_tag_at( 0, "strikethrough" ), 'strikethrough tag' );
};

subtest "HTML entities get decoded" => sub {
   my @p = App::sdview::Parser::Markdown->new->parse_string( <<"EOMARKDOWN" );
Some content with non-breaking&nbsp;spaces in it.

Text &ndash; with HTML entities
EOMARKDOWN

   is( scalar @p, 2, 'Received 2 paragraphs' );

   is( $p[0]->type, "plain", 'p[0] type' );
   is( $p[0]->text, "Some content with non-breaking\xA0spaces in it.", 'p[0] text' );



( run in 0.226 second using v1.01-cache-2.11-cpan-26ccb49234f )