$s = $l->linkify_2($s);
is($s, qq(hello <a\nhref="$u">$u</a> world), 'URL preserved');
+ $s = "$u. hi";
+ $s = $l->linkify_1($s);
+ $s = $l->linkify_2($s);
+ is($s, qq(<a\nhref="$u">$u</a>. hi), 'paired () in URL OK');
+
$u .= "?query=a";
$s = "hello $u world";
$s = $l->linkify_1($s);
}
}
+# dangling ')' cf. see MaintNotes in git.git todo branch
+{
+ my $l = PublicInbox::Linkify->new;
+ my $s = '(see http://example.com/).';
+ $s = $l->linkify_1($s);
+ $s = $l->linkify_2($s);
+ like($s, qr!\(see <a[^>]+>http://example\.com/</a>\)\.!s,
+ 'punctuation with unpaired ) OK')
+}
+
done_testing();