]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1150667: Don't wrap email comments when in markdown mode
authorAlbert Ting <altlist@gmail.com>
Mon, 13 Apr 2015 14:15:29 +0000 (15:15 +0100)
committerDavid Lawrence <dkl@mozilla.com>
Mon, 13 Apr 2015 14:15:29 +0000 (15:15 +0100)
r=dkl,a=glob

template/en/default/email/bugmail.html.tmpl
template/en/default/email/flagmail.html.tmpl

index 1a74db4dcf0a9f1034cc6582239888c418fa2d30..e3b63f10b4e1d1e1515b4608fd562349a2b3bff9 100644 (file)
                                                full_url = 1, user = to_user %]
               from [% INCLUDE global/user.html.tmpl user = to_user, who = comment.author %]</b>
           [% 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 %]>
         </div>
       [% END %]
       </p>
index 1c8fc073117445bf8c4f16da2801bea6c3641524..152c3420efde2754b07debe7cb9d0d6a808623bb 100644 (file)
@@ -73,7 +73,8 @@
             <b>Description:</b>
           [% 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 %]>
         </div>
       [% END %]
     </p>