From: Albert Ting
Date: Mon, 13 Apr 2015 14:15:29 +0000 (+0100)
Subject: Bug 1150667: Don't wrap email comments when in markdown mode
X-Git-Tag: release-5.1.1~284
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=464dad0e3d986addd65235d768554a9753a2c849;p=thirdparty%2Fbugzilla.git
Bug 1150667: Don't wrap email comments when in markdown mode
r=dkl,a=glob
---
diff --git a/template/en/default/email/bugmail.html.tmpl b/template/en/default/email/bugmail.html.tmpl
index 1a74db4dcf..e3b63f10b4 100644
--- a/template/en/default/email/bugmail.html.tmpl
+++ b/template/en/default/email/bugmail.html.tmpl
@@ -28,8 +28,11 @@
full_url = 1, user = to_user %]
from [% INCLUDE global/user.html.tmpl user = to_user, who = comment.author %]
[% END %]
- [% comment_div = comment.is_markdown ? "div" : "pre" %]
- <[% comment_div FILTER none %] class="bz_comment_text">[% comment.body_full({ wrap => 1 }) FILTER markdown(bug, comment, to_user) %][% comment_div FILTER none %]>
+ [% comment_div = comment.is_markdown ? "div" : "pre" %]
+ [% wrap = comment.is_markdown ? 0 : 1 %]
+ <[% comment_div FILTER none %] class="bz_comment_text">
+ [% comment.body_full({ wrap => wrap }) FILTER markdown(bug, comment, to_user) %]
+ [% comment_div FILTER none %]>
[% END %]
diff --git a/template/en/default/email/flagmail.html.tmpl b/template/en/default/email/flagmail.html.tmpl
index 1c8fc07311..152c3420ef 100644
--- a/template/en/default/email/flagmail.html.tmpl
+++ b/template/en/default/email/flagmail.html.tmpl
@@ -73,7 +73,8 @@
Description:
[% END %]
[% comment_div = comment.is_markdown ? "div" : "pre" %]
- <[% comment_div FILTER none %] class="bz_comment_text">[% comment.body_full({ wrap => 1 }) FILTER markdown(bug, comment, to_user) %][% comment_div FILTER none %]>
+ [% wrap = comment.is_markdown ? 0 : 1 %]
+ <[% comment_div FILTER none %] class="bz_comment_text">[% comment.body_full({ wrap => wrap }) FILTER markdown(bug, comment, to_user) %][% comment_div FILTER none %]>
[% END %]