mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-28 04:36:11 +01:00
#3464 add diff signs which does not have inline diff
This commit is contained in:
parent
9349def72e
commit
b1504ed99a
|
@ -164,14 +164,14 @@ func (diffSection *DiffSection) GetComputedInlineDiffFor(diffLine *DiffLine) tem
|
||||||
case DIFF_LINE_ADD:
|
case DIFF_LINE_ADD:
|
||||||
compareDiffLine = diffSection.GetLine(DIFF_LINE_DEL, diffLine.RightIdx)
|
compareDiffLine = diffSection.GetLine(DIFF_LINE_DEL, diffLine.RightIdx)
|
||||||
if compareDiffLine == nil {
|
if compareDiffLine == nil {
|
||||||
return template.HTML(html.EscapeString(diffLine.Content[1:]))
|
return template.HTML(html.EscapeString(diffLine.Content))
|
||||||
}
|
}
|
||||||
diff1 = compareDiffLine.Content
|
diff1 = compareDiffLine.Content
|
||||||
diff2 = diffLine.Content
|
diff2 = diffLine.Content
|
||||||
case DIFF_LINE_DEL:
|
case DIFF_LINE_DEL:
|
||||||
compareDiffLine = diffSection.GetLine(DIFF_LINE_ADD, diffLine.LeftIdx)
|
compareDiffLine = diffSection.GetLine(DIFF_LINE_ADD, diffLine.LeftIdx)
|
||||||
if compareDiffLine == nil {
|
if compareDiffLine == nil {
|
||||||
return template.HTML(html.EscapeString(diffLine.Content[1:]))
|
return template.HTML(html.EscapeString(diffLine.Content))
|
||||||
}
|
}
|
||||||
diff1 = diffLine.Content
|
diff1 = diffLine.Content
|
||||||
diff2 = compareDiffLine.Content
|
diff2 = compareDiffLine.Content
|
||||||
|
|
Loading…
Reference in a new issue