diff options
author | Israel Madueme <purelogiq@gmail.com> | 2018-08-10 14:57:01 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-08-10 14:57:01 +0200 |
commit | fd850e00db835d2b84c59014c3b1021fea2294fc (patch) | |
tree | b5529f9bf45bb2b8f66b19714d215f1ca6c06c94 /Bugzilla/Bug.pm | |
parent | 5a43b27f7940be9697f312c550fa2de11a9e14d7 (diff) | |
download | bugzilla-fd850e00db835d2b84c59014c3b1021fea2294fc.tar.gz bugzilla-fd850e00db835d2b84c59014c3b1021fea2294fc.tar.xz |
Bug 1456878 - Support markdown comments
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r-- | Bugzilla/Bug.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index ee48ed7a2..9c820eedc 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -732,7 +732,7 @@ sub _preload_referenced_bugs { } else { # bugs referenced in comments - Bugzilla::Template::quoteUrls($comment->body, undef, undef, undef, + Bugzilla::Template::renderComment($comment->body, undef, undef, 1, sub { my $bug_id = $_[0]; push @referenced_bug_ids, $bug_id @@ -999,6 +999,7 @@ sub create { # We now have a bug id so we can fill this out $creation_comment->{'bug_id'} = $bug->id; + $creation_comment->{'is_markdown'} = 1; # Insert the comment. We always insert a comment on bug creation, # but sometimes it's blank. @@ -2662,7 +2663,8 @@ sub set_all { # there are lots of things that want to check if we added a comment. $self->add_comment($params->{'comment'}->{'body'}, { isprivate => $params->{'comment'}->{'is_private'}, - work_time => $params->{'work_time'} }); + work_time => $params->{'work_time'}, + is_markdown => 1 }); } if (defined $params->{comment_tags} && Bugzilla->user->can_tag_comments()) { @@ -3143,7 +3145,7 @@ sub remove_cc { @$cc_users = grep { $_->id != $user->id } @$cc_users; } -# $bug->add_comment("comment", {isprivate => 1, work_time => 10.5, +# $bug->add_comment("comment", {isprivate => 1, work_time => 10.5, is_markdown => 1, # type => CMT_NORMAL, extra_data => $data}); sub add_comment { my ($self, $comment, $params) = @_; |