# HG changeset patch # User Mads Kiilerich # Date 1473115878 -7200 # Node ID 1717a7a4ae0c102649a06a64e7ea052e16f3439f # Parent f486d1d270256295ce43f6e605fb2ff317c32001 helpers: make linkify_others slightly smarter - don't markup empty space diff -r f486d1d27025 -r 1717a7a4ae0c kallithea/lib/helpers.py --- a/kallithea/lib/helpers.py Tue Sep 06 00:51:18 2016 +0200 +++ b/kallithea/lib/helpers.py Tue Sep 06 00:51:18 2016 +0200 @@ -1337,7 +1337,7 @@ urls = re.compile(r'(\)',) links = [] for e in urls.split(t): - if not urls.match(e): + if e.strip() and not urls.match(e): links.append('%s' % (l, e)) else: links.append(e) diff -r f486d1d27025 -r 1717a7a4ae0c kallithea/tests/other/test_libs.py --- a/kallithea/tests/other/test_libs.py Tue Sep 06 00:51:18 2016 +0200 +++ b/kallithea/tests/other/test_libs.py Tue Sep 06 00:51:18 2016 +0200 @@ -362,7 +362,6 @@ @parametrize('sample,expected', [ ("deadbeefcafe @mention, and http://foo.bar/ yo", - """""" """deadbeefcafe""" """ @mention, and """ """http://foo.bar/"""