Closed Bug 136003 Opened 23 years ago Closed 23 years ago

two extra spaces after every comment

Categories

(Bugzilla :: Bugzilla-General, defect, P3)

2.15
x86
Linux
defect

Tracking

()

RESOLVED FIXED
Bugzilla 2.16

People

(Reporter: bbaetz, Assigned: bbaetz)

Details

(Keywords: regression)

Attachments

(1 file)

comments.tmpl has:

  <pre>
    [%- quoteUrls(comment.body) -%]
  </pre>

I added the - bits to stop new lines, but it still adds the spaces, since the
generated html is:

  <pre>asda  </pre>

This is because PRE_CHOMP removes whitespace back to the end of the preceeding
line, but POST_CHOMP (which we don't use by default for some reason I don't
really understand) only chomps to the beginning of teh next line.

The fix is to just move this all only one single line, so I'll attach the
trivial patch.
Attached patch v1Splinter Review
The alternate fix is to just move the <pre> and its contents onto one single
line.
Status: NEW → ASSIGNED
Keywords: patch, regression, review
Priority: -- → P3
Target Milestone: --- → Bugzilla 2.16
Is there a reason not to turn on POST_CHOMP?  Why is PRE and POST asymmetric?  I
this worth worrying about?
apparently it was so that templates were easy to look at to debug.

post and pre aren't really different - PRE removes stuff before the directive
onthe same line, and POST removes stuff after the directive on teh same line.

POST_ wouldn't help here, though, because of that - that was just a side issue I
mentioned in passing.
Comment on attachment 78070 [details] [diff] [review]
v1

2xr=gerv.

The reason we don't use POST_CHOMP as well as PRE_CHOMP is that then the
generated HTML would be all on one line (mostly) rather than the
reasonably-nicely-formatted stuff we produce at the moment. This would make
templates a lot harder to debug.

Gerv
Attachment #78070 - Flags: review+
Yeah, but we can still turn it off privately for debugging. I predict that there
are more bugzilla page views which are not debugging than those that are...

Anyway, checked in
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: