Changeset - 10d0aec7e68b
[Not reviewed]
default
0 2 0
Kateryna Musina - 10 years ago 2016-05-03 14:57:44
kateryna@unity3d.com
helpers: remove <code> from render_w_mentions

b97ba9b23796 introduced use of <code>, but that is semantically incorrect.

The mail templates do not have css and we thus put explicit styling around its
use.
2 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/helpers.py
Show inline comments
 
@@ -1419,25 +1419,25 @@ def render_w_mentions(source, repo_name=
 
    """
 
    s = source.rstrip()
 
    s = safe_unicode(s)
 
    s = '\n'.join(s.splitlines())
 
    s = html_escape(s)
 
    # this sequence of html-ifications seems to be safe and non-conflicting
 
    # if the issues regexp is sane
 
    s = _urlify_text(s)
 
    if repo_name is not None:
 
        s = urlify_changesets(s, repo_name)
 
    s = urlify_issues(s, repo_name)
 
    s = MENTIONS_REGEX.sub(_mentions_replace, s)
 
    return literal('<code style="white-space:pre-wrap">%s</code>' % s)
 
    return literal('<div class="formatted-fixed">%s</div>' % s)
 

	
 

	
 
def short_ref(ref_type, ref_name):
 
    if ref_type == 'rev':
 
        return short_id(ref_name)
 
    return ref_name
 

	
 
def link_to_ref(repo_name, ref_type, ref_name, rev=None):
 
    """
 
    Return full markup for a href to changeset_home for a changeset.
 
    If ref_type is branch it will link to changelog.
 
    ref_name is shortened if ref_type is 'rev'.
kallithea/templates/email_templates/pull_request.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="main.html"/>
 

	
 
%if is_mention:
 
<p>${_('%s mentioned you on %s pull request "%s"') % (pr_user_created, repo_name, pr_title)}</p>
 
%else:
 
<p>${_('%s requested your review of %s pull request "%s"') % (pr_user_created, repo_name, pr_title)}</p>
 
%endif
 

	
 
<p>${_('URL')}: <a href="${pr_url}">${pr_url}</a></p>
 

	
 
<p>${_('Description')}:</p>
 
<p style="white-space: pre-wrap;">${body}</p>
 
<p style="white-space: pre-wrap; font-family: monospace">${body}</p>
 

	
 
<p>${_('Changesets')}:</p>
 
<p style="white-space: pre-wrap;">
 
<p style="white-space: pre-wrap">
 
%for r,r_msg in pr_revisions:
 
<i><a href="${h.canonical_url('changeset_home', repo_name=org_repo_name, revision=r)}">${h.short_id(r)}</a></i>:
 
${h.shorter(r_msg, 256)}
 

	
 
%endfor
 
</p>
0 comments (0 inline, 0 general)