retronews

a featureful fork of the luke8086/retronews hn+lobste.rs tui
Log | Files | Refs | README | LICENSE

commit 91bc2f709ca2734cc525b07068e6ea795a33c842
parent 458165e57d74f141ecdf44fb9194b6d956035f24
Author: luke8086 <55237178+luke8086@users.noreply.github.com>
Date:   Fri, 16 Jun 2023 16:58:20 +0000

Improve URL regexp to avoid matching trailing punctuation

Diffstat:
Mretronews.py | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/retronews.py b/retronews.py @@ -149,7 +149,7 @@ QUOTE_REX = re.compile(r"^(> ?)+") REFERENCE_REX = re.compile(r"^\[\d+\][ :-]*https?://[^ ]*$") # Recognize http/https URLs -URL_REX = re.compile(r"(https?://[^\s\),]+)") +URL_REX = re.compile(r"(https?://[^\s\)\"<,]+[^\s\)\"<,\.])") # FIXME: Use TypeAlias after migrating to Python 3.10 Window = NewType("Window", "curses._CursesWindow")