Changeset - 1717a7a4ae0c
[Not reviewed]
default
0 2 0
Mads Kiilerich - 9 years ago 2016-09-06 00:51:18
madski@unity3d.com
helpers: make linkify_others slightly smarter - don't markup empty space
2 files changed with 1 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/helpers.py
Show inline comments
 
@@ -1337,7 +1337,7 @@ def linkify_others(t, l):
 
    urls = re.compile(r'(\<a.*?\<\/a\>)',)
 
    links = []
 
    for e in urls.split(t):
 
        if not urls.match(e):
 
        if e.strip() and not urls.match(e):
 
            links.append('<a class="message-link" href="%s">%s</a>' % (l, e))
 
        else:
 
            links.append(e)
kallithea/tests/other/test_libs.py
Show inline comments
 
@@ -362,7 +362,6 @@ class TestLibs(TestController):
 

	
 
    @parametrize('sample,expected', [
 
      ("deadbeefcafe @mention, and http://foo.bar/ yo",
 
       """<a class="message-link" href="#the-link"></a>"""
 
       """<a class="revision-link" href="/repo_name/changeset/deadbeefcafe">deadbeefcafe</a>"""
 
       """<a class="message-link" href="#the-link"> <b>@mention</b>, and </a>"""
 
       """<a href="http://foo.bar/">http://foo.bar/</a>"""
0 comments (0 inline, 0 general)