From 77879a14508556d31106d63392b54be24298d451 Mon Sep 17 00:00:00 2001 From: Zed Date: Thu, 27 Jun 2019 22:30:00 +0200 Subject: [PATCH] Fix url regex --- src/formatters.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/formatters.nim b/src/formatters.nim index 25b8479..122f2b4 100644 --- a/src/formatters.nim +++ b/src/formatters.nim @@ -6,7 +6,7 @@ import ./types, ./utils from unicode import Rune, `$` const - urlRegex = re"((https?|ftp)://(-\.)?([^\s/?\.#]+\.?)+(/[^\s\)]*)?)" + urlRegex = re"((https?|ftp)://(-\.)?([^\s/?\.#]+\.?)+([/\?][^\s\)]*)?)" emailRegex = re"([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)" usernameRegex = re"(^|[\s\.,>])@([A-z0-9_]+)" picRegex = re"pic.twitter.com/[^ ]+"