From ec5caa57cc14a328b8b994d49cb8def8eb95aea7 Mon Sep 17 00:00:00 2001 From: Koosha KM Date: Thu, 28 Aug 2014 17:17:54 +0000 Subject: Bug 330707: Add optional support for MarkDown r=dkl,a=sgreen --- Bugzilla/Comment.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Bugzilla/Comment.pm') diff --git a/Bugzilla/Comment.pm b/Bugzilla/Comment.pm index c235b8d30..3dabe6702 100644 --- a/Bugzilla/Comment.pm +++ b/Bugzilla/Comment.pm @@ -43,6 +43,7 @@ use constant DB_COLUMNS => qw( already_wrapped type extra_data + is_markdown ); use constant UPDATE_COLUMNS => qw( @@ -65,6 +66,7 @@ use constant VALIDATORS => { work_time => \&_check_work_time, thetext => \&_check_thetext, isprivate => \&_check_isprivate, + is_markdown => \&Bugzilla::Object::check_boolean, extra_data => \&_check_extra_data, type => \&_check_type, }; @@ -177,6 +179,7 @@ sub body { return $_[0]->{'thetext'}; } sub bug_id { return $_[0]->{'bug_id'}; } sub creation_ts { return $_[0]->{'bug_when'}; } sub is_private { return $_[0]->{'isprivate'}; } +sub is_markdown { return $_[0]->{'is_markdown'}; } sub work_time { # Work time is returned as a string (see bug 607909) return 0 if $_[0]->{'work_time'} + 0 == 0; @@ -274,6 +277,7 @@ sub body_full { sub set_is_private { $_[0]->set('isprivate', $_[1]); } sub set_type { $_[0]->set('type', $_[1]); } sub set_extra_data { $_[0]->set('extra_data', $_[1]); } +sub set_is_markdown { $_[0]->set('is_markdown', $_[1]); } sub add_tag { my ($self, $tag) = @_; @@ -522,6 +526,10 @@ C Time spent as related to this comment. C Comment is marked as private. +=item C + +C Whether this comment needs L rendering to be applied. + =item C If this comment is stored in the database word-wrapped, this will be C<1>. @@ -617,6 +625,16 @@ A string, the full text of the comment as it would be displayed to an end-user. =cut +=head2 Modifiers + +=over + +=item C + +Sets whether this comment needs L rendering to be applied. + +=back + =head1 B =over -- cgit v1.2.3-24-g4f1b