File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ func (d *DiffLine) GetHTMLDiffLineType() string {
118118
119119// CanComment returns whether a line can get commented
120120func (d * DiffLine ) CanComment () bool {
121- return len (d .Comments ) == 0 && d . Type != DiffLineSection
121+ return len (d .Comments ) == 0
122122}
123123
124124// GetCommentSide returns the comment side of the first comment, if not set returns empty string
Original file line number Diff line number Diff line change @@ -615,7 +615,7 @@ func TestDiff_LoadCommentsWithOutdated(t *testing.T) {
615615}
616616
617617func TestDiffLine_CanComment (t * testing.T ) {
618- assert .False (t , (& DiffLine {Type : DiffLineSection }).CanComment ())
618+ assert .True (t , (& DiffLine {Type : DiffLineSection }).CanComment ())
619619 assert .False (t , (& DiffLine {Type : DiffLineAdd , Comments : []* issues_model.Comment {{Content : "bla" }}}).CanComment ())
620620 assert .True (t , (& DiffLine {Type : DiffLineAdd }).CanComment ())
621621 assert .True (t , (& DiffLine {Type : DiffLineDel }).CanComment ())
You can’t perform that action at this time.
0 commit comments