##// 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 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 735 import re
736 736
737 737 url_pat = re.compile(r'''(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]'''
@@ -741,9 +741,9 b' def urlify_text(text):'
741 741 url_full = match_obj.groups()[0]
742 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 747 import re
748 748 import traceback
749 749
@@ -757,19 +757,26 b' def urlify_commit(text):'
757 757 ISSUE_PREFIX = conf.get('issue_prefix')
758 758 def url_func(match_obj):
759 759 issue_id = match_obj.groups()[0]
760 return ' <a href="%(url)s">%(issue-prefix)s%(id-repr)s</a>' % (
761 {'url':ISSUE_SERVER.replace('{id}',issue_id),
760 tmpl = (
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 769 'id-repr':issue_id,
763 770 'issue-prefix':ISSUE_PREFIX,
764 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 775 except:
769 776 log.error(traceback.format_exc())
770 777 pass
771 778
772 return text
779 return text_
773 780
774 781 def rst(source):
775 782 return literal('<div class="rst-block">%s</div>' %
General Comments 0
You need to be logged in to leave comments. Login now