From: Daniel Martí Date: Sat, 24 Oct 2015 22:07:33 +0000 (+0200) Subject: lint: fix unlinkified links regex X-Git-Tag: 0.5.0~32 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=db31eddd7e05301b598c6eefbf3c695a88f18eb6;p=fdroidserver.git lint: fix unlinkified links regex It was incorrectly matching: foo [http://bar and not matching: http://foo (start of line) --- diff --git a/fdroidserver/lint.py b/fdroidserver/lint.py index fb2ce2c0..82c6eddd 100644 --- a/fdroidserver/lint.py +++ b/fdroidserver/lint.py @@ -97,7 +97,7 @@ regex_checks = { "Unnecessary trailing space"), (re.compile(r'.*([^[]|^)\[[^:[\]]+( |\]|$)'), "Invalid link - use [http://foo.bar Link title] or [http://foo.bar]"), - (re.compile(r'.*[^[]https?://[^ ]+'), + (re.compile(r'(^|.* )https?://[^ ]+'), "Unlinkified link - use [http://foo.bar Link title] or [http://foo.bar]"), ], }