changeset 6178:7fbdd1926fa8

helpers: clarify the purpose of linkify_others
author Mads Kiilerich <madski@unity3d.com>
date Tue, 06 Sep 2016 00:51:18 +0200
parents ea59ff1f5639
children c759acdc463a
files kallithea/lib/helpers.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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
@@ -1314,7 +1314,10 @@
 
 
 def linkify_others(t, l):
-    # attempt at fixing double quoting?
+    """Add a default link to html with links.
+    HTML doesn't allow nesting of links, so the outer link must be broken up
+    in pieces and give space for other links.
+    """
     urls = re.compile(r'(\<a.*?\<\/a\>)',)
     links = []
     for e in urls.split(t):
@@ -1328,8 +1331,8 @@
 def urlify_commit(text_, repo_name, link_=None):
     """
     Parses given text message and makes proper links.
-    issues are linked to given issue-server, and rest is a changeset link
-    if link_ is given, in other case it's a plain text
+    Issues are linked to given issue-server. If link_ is provided, all other
+    text will link there.
     """
     newtext = html_escape(text_)