[fix] Make files links nicer

This commit is contained in:
Alban Crommer 2020-05-22 20:27:22 +00:00 committed by Alban Crommer
parent fd4d8c0e85
commit f6bfbfeba9
1 changed files with 2 additions and 2 deletions

View File

@ -19,9 +19,9 @@ escape = function(string) {
return htmlEscapes[match]; return htmlEscapes[match];
}); });
}; };
var urlRegex = /(https?://[^\s]+)/g; var urlRegex = /(\S+): (https?://[^\s]+)/g;
url = function(string){ url = function(string){
return ''+string.replace(urlRegex, '<a target="_blank" href="$1">$1</a>') return ''+string.replace(urlRegex, '<a target="_blank" href="$2">$1</a>')
} }
var titleRegex = /^(.*\n)/; var titleRegex = /^(.*\n)/;
title = function(string){ title = function(string){