markup.pm: support simple http links

This commit is contained in:
Milan
2020-11-15 20:29:17 +01:00
parent 301e3d0d5b
commit 83d3e74561
+1
View File
@@ -149,6 +149,7 @@ sub markdown_to_html($){
my $text = $_[0] // '';
print STDERR "markwon!\n";
my $html = Text::Markdown::markdown($text);
$html=~s!(\s)(https?://[^\s]+)(\s)!$1<a href="$2">$2</a>$3!g;
return $html;
}