From 423c8fd8fc6b88763dc4cbc53a723a3c639d0e81 Mon Sep 17 00:00:00 2001 From: Feuerfuchs Date: Tue, 12 Nov 2019 13:57:00 +0100 Subject: Include comma in URL regex --- js/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/main.ts b/js/main.ts index 29b4a68..e8c2cfb 100644 --- a/js/main.ts +++ b/js/main.ts @@ -298,7 +298,7 @@ function generateMarkupForPlainLinks() { } const contentEl = document.getElementsByClassName('content')[0]; - const urlRegex = /\b[a-z]*:\/\/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,}\b[-a-zA-Z0-9@:%_\+.~#?&//=]*/g; + const urlRegex = /\b[a-z]*:\/\/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,}\b[-a-zA-Z0-9@:%_\+.,~#?&//=]*/g; const mailRegex = /\bmailto:[-a-zA-Z0-9@:%._\+~#=]+@(?:[-a-zA-Z0-9@:%._\+~#=]+\.)+[a-z]{2,}\b/g; contentEl.innerHTML = contentEl.innerHTML.replace(urlRegex, match => { -- cgit v1.2.3-70-g09d2