changeset 5929:10d0aec7e68b

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.
author Kateryna Musina <kateryna@unity3d.com>
date Tue, 03 May 2016 14:57:44 +0200
parents ecc2a13a308d
children db2e1fb6aec7
files kallithea/lib/helpers.py kallithea/templates/email_templates/pull_request.html
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/helpers.py	Mon May 23 18:02:33 2016 +0200
+++ b/kallithea/lib/helpers.py	Tue May 03 14:57:44 2016 +0200
@@ -1428,7 +1428,7 @@
         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):
--- a/kallithea/templates/email_templates/pull_request.html	Mon May 23 18:02:33 2016 +0200
+++ b/kallithea/templates/email_templates/pull_request.html	Tue May 03 14:57:44 2016 +0200
@@ -10,10 +10,10 @@
 <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)}