]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/linkify.t
linkify: implement Markdown link compatibility
[public-inbox.git] / t / linkify.t
index 49cbbd64edf5d18ca1892f91abd111afed88407e..a794c785221e3349790528b8e3c69f706cf9d757 100644 (file)
@@ -57,4 +57,13 @@ use PublicInbox::Linkify;
        is($s, qq(hello <a\nhref="$u">$u</a> world), "root + fragment");
 }
 
+{
+       my $l = PublicInbox::Linkify->new;
+       my $u = 'http://example.com/';
+       my $s = "[markdown]($u)";
+       $s = $l->linkify_1($s);
+       $s = $l->linkify_2($s);
+       is($s, qq![markdown](<a\nhref="$u">$u</a>)!, 'markdown compatible');
+}
+
 done_testing();