##// END OF EJS Templates
added class into issue tracker link
marcink -
r1840:87920d4f beta
parent child Browse files
Show More
@@ -731,7 +731,7 b' def fancy_file_stats(stats):'
731 return literal('<div style="width:%spx">%s%s</div>' % (width, d_a, d_d))
731 return literal('<div style="width:%spx">%s%s</div>' % (width, d_a, d_d))
732
732
733
733
734 def urlify_text(text):
734 def urlify_text(text_):
735 import re
735 import re
736
736
737 url_pat = re.compile(r'''(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]'''
737 url_pat = re.compile(r'''(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]'''
@@ -741,9 +741,9 b' def urlify_text(text):'
741 url_full = match_obj.groups()[0]
741 url_full = match_obj.groups()[0]
742 return '<a href="%(url)s">%(url)s</a>' % ({'url':url_full})
742 return '<a href="%(url)s">%(url)s</a>' % ({'url':url_full})
743
743
744 return literal(url_pat.sub(url_func, text))
744 return literal(url_pat.sub(url_func, text_))
745
745
746 def urlify_commit(text):
746 def urlify_commit(text_):
747 import re
747 import re
748 import traceback
748 import traceback
749
749
@@ -757,19 +757,26 b' def urlify_commit(text):'
757 ISSUE_PREFIX = conf.get('issue_prefix')
757 ISSUE_PREFIX = conf.get('issue_prefix')
758 def url_func(match_obj):
758 def url_func(match_obj):
759 issue_id = match_obj.groups()[0]
759 issue_id = match_obj.groups()[0]
760 return ' <a href="%(url)s">%(issue-prefix)s%(id-repr)s</a>' % (
760 tmpl = (
761 {'url':ISSUE_SERVER.replace('{id}',issue_id),
761 '<a class="%(cls)s" href="%(url)s">'
762 ' %(issue-prefix)s%(id-repr)s'
763 '</a>'
764 )
765 return tmpl % (
766 {
767 'cls':'issue-tracker-link',
768 'url':ISSUE_SERVER.replace('{id}',issue_id),
762 'id-repr':issue_id,
769 'id-repr':issue_id,
763 'issue-prefix':ISSUE_PREFIX,
770 'issue-prefix':ISSUE_PREFIX,
764 'serv':ISSUE_SERVER,
771 'serv':ISSUE_SERVER,
765 }
772 }
766 )
773 )
767 return literal(URL_PAT.sub(url_func, text))
774 return literal(URL_PAT.sub(url_func, text_))
768 except:
775 except:
769 log.error(traceback.format_exc())
776 log.error(traceback.format_exc())
770 pass
777 pass
771
778
772 return text
779 return text_
773
780
774 def rst(source):
781 def rst(source):
775 return literal('<div class="rst-block">%s</div>' %
782 return literal('<div class="rst-block">%s</div>' %
General Comments 0
You need to be logged in to leave comments. Login now