Closed Bug 127507 Opened 23 years ago Closed 23 years ago

comments template adds one too many lines

Categories

(Bugzilla :: Query/Bug List, defect, P2)

2.15
x86
Linux

Tracking

()

RESOLVED FIXED
Bugzilla 2.16

People

(Reporter: bbaetz, Assigned: bbaetz)

Details

Attachments

(1 file)

The comments template has: <pre> [% quoteUrls(comment.body) %] </pre> which produces: <pre>Comment of some sort </pre> Because of the pre block, this adds '\n ' to the end of each comment. We default to PRE_CHOMP, which compresses the first one, but not POST_CHOMP, so the end remains wrapped. Is there a reason for this? The fix for this is trivial - either add POST_CHOMP => 1 into globals.pl, or just do it for this comment by adding a - before the %. I prefer the first option, and I didn't see anything which would break on it. It is overridable on a case by case basis. Once we decide, I'll attach a patch for the chosen option. Comments?
Priority: -- → P2
Target Milestone: --- → Bugzilla 2.16
Note that it does change the html - for example the select blocks are now all on one line (although they do have space in between, because of the indentation). It doesn't change the resulting display, though, which is what matters.
Status: NEW → ASSIGNED
Summary: comments template adds one too many line → comments template adds one too many lines
It's not, though. For debugging purposes, being able to read our HTML is important. We had very careful discussions at the beginning of the templatisation process about which of PRE_ and POST_CHOMP to set, and decided on the current scheme for that reason. I'll insert a "-". Patch sometime today. Gerv
Attached patch Patch v.1 (deleted) — Splinter Review
This patch does what's requested, but it looks the same to me before and after in Moz. <shrug> Gerv
Comment on attachment 71170 [details] [diff] [review] Patch v.1 No - flip between a page with and without this, and you'll see the difference. Why did we want our html to be readable? You can always turn the option off if you want to debug. Anyway, thats not the issue here - I'll go file a bug on bmo using mod_gzip. r=bbaetz x2, since this is exactly what I have in my tree.
Attachment #71170 - Flags: review+
Checked in. Checking in template/default/show/comments.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/default/show/comments.tmpl,v <-- comments.tmpl new revision: 1.2; previous revision: 1.1 done Gerv
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: