Text::Markdown::Discount
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
591 B

use strict;
use warnings;
use utf8;
use Test::More tests => 3;
use Text::Markdown::Discount;
my $html = '<article>abc</article>';
{
my $md = Text::Markdown::Discount->new;
is trim($md->markdown($html)), '<p><article>abc</article></p>';
}
{
my $md = Text::Markdown::Discount->new(html5 => 1);
is trim($md->markdown($html)), '<article>abc</article>';
}
{
my $md = Text::Markdown::Discount->new({html5 => 1});
is trim($md->markdown($html)), '<article>abc</article>';
}
sub trim {
my $text = shift;
$text =~ s/\A\s+//ms;
$text =~ s/\s+$//ms;
$text;
}