diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -760,9 +760,13 @@ def urlify_commit(text_, repository=None 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 = ( - ' ' + '%(pref)s' '%(issue-prefix)s%(id-repr)s' '' ) @@ -775,6 +779,7 @@ def urlify_commit(text_, repository=None return tmpl % ( { + 'pref': pref, 'cls': 'issue-tracker-link', 'url': url, 'id-repr': issue_id,