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
549 B

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