Changeset - 32e1e0745d3c
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2012-01-19 02:47:48
marcin@python-works.com
fixes issue with whitespace for referenced tasks in commit messages
1 file changed with 6 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/helpers.py
Show inline comments
 
@@ -757,27 +757,32 @@ def urlify_commit(text_, repository=None
 

	
 
        if URL_PAT:
 
            ISSUE_SERVER_LNK = conf.get('issue_server_link')
 
            ISSUE_PREFIX = conf.get('issue_prefix')
 

	
 
            def url_func(match_obj):
 
                pref = ''
 
                if match_obj.group().startswith(' '):
 
                    pref = ' '
 

	
 
                issue_id = match_obj.groups()[0]
 
                tmpl = (
 
                ' <a class="%(cls)s" href="%(url)s">'
 
                '%(pref)s<a class="%(cls)s" href="%(url)s">'
 
                '%(issue-prefix)s%(id-repr)s'
 
                '</a>'
 
                )
 
                url = ISSUE_SERVER_LNK.replace('{id}', issue_id)
 
                if repository:
 
                    url = url.replace('{repo}', repository)
 

	
 
                if link_:
 
                    tmpl = '</a>' + tmpl + link_
 

	
 
                return tmpl % (
 
                    {
 
                     'pref': pref,
 
                     'cls': 'issue-tracker-link',
 
                     'url': url,
 
                     'id-repr': issue_id,
 
                     'issue-prefix': ISSUE_PREFIX,
 
                     'serv': ISSUE_SERVER_LNK,
 
                    }
0 comments (0 inline, 0 general)