$template->process("bug/format_comment.txt.tmpl", $vars, \$body)
|| ThrowTemplateError($template->error());
+ $body =~ s/^X//;
return $body;
}
# Contributor(s): Marc Schumann <wurblzap@gmail.com>
#%]
+[%# NOTE: Everywhere you use this template, you must call
+ # "FILTER remove('^X')" on the result. This is unfortunately the only way
+ # to preserve leading whitespace in comments.
+ #%]
+
[%# INTERFACE:
# comment: A hash containing comment information.
# count: The comment number (on the bug it belongs to)
[% PROCESS 'global/field-descs.none.tmpl' %]
[%- IF comment.type == constants.CMT_DUPE_OF -%]
-[% comment.body %]
+X[% comment.body %]
*** This [% terms.bug %] has been marked as a duplicate of [% terms.bug %] [%+ comment.extra_data %] ***
[% ELSIF comment.type == constants.CMT_HAS_DUPE %]
[% ELSIF comment.type == constants.CMT_POPULAR_VOTES %]
*** This [% terms.bug %] has been confirmed by popular vote. ***
[% ELSIF comment.type == constants.CMT_MOVED_TO %]
-[% comment.body %]
+X[% comment.body %]
[%+ terms.Bug %] moved to [% Param("move-to-url") %].
If the move succeeded, [% comment.extra_data %] will receive a mail containing
[%+ get_status('VERIFIED') %], and paste in a link to the new [% terms.bug %].
Otherwise, reopen this [% terms.bug %].
[%- ELSE -%]
-[%- comment.body %]
+X[%- comment.body %]
[% END %]
[%- IF comment.count %]
--- Comment #[% comment.count %] from [% comment.author.identity %] [%+ comment.time FILTER time %] ---
[% END %]
-[%+ PROCESS bug/format_comment.txt.tmpl comment = comment %]
+[%+ FILTER remove('^X') %][% PROCESS bug/format_comment.txt.tmpl %][% END %]
[% END %]
-- [%# Protect the trailing space of the signature marker %]