aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-16 07:37:28 -0700
committerUnknwon <u@gogs.io>2016-08-16 07:37:28 -0700
commitb1504ed99a145fbc8d3aaa43513f006f8b2fd253 (patch)
treecc9452adff06cb91d70b2b057eb9f7332cb2eb88
parent9349def72e687c590ed34403f7663c309376610e (diff)
downloadgitea-b1504ed99a145fbc8d3aaa43513f006f8b2fd253.tar.gz
gitea-b1504ed99a145fbc8d3aaa43513f006f8b2fd253.zip
#3464 add diff signs which does not have inline diff
-rw-r--r--models/git_diff.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/git_diff.go b/models/git_diff.go
index a45c44345b..107f630ff9 100644
--- a/models/git_diff.go
+++ b/models/git_diff.go
@@ -164,14 +164,14 @@ func (diffSection *DiffSection) GetComputedInlineDiffFor(diffLine *DiffLine) tem
case DIFF_LINE_ADD:
compareDiffLine = diffSection.GetLine(DIFF_LINE_DEL, diffLine.RightIdx)
if compareDiffLine == nil {
- return template.HTML(html.EscapeString(diffLine.Content[1:]))
+ return template.HTML(html.EscapeString(diffLine.Content))
}
diff1 = compareDiffLine.Content
diff2 = diffLine.Content
case DIFF_LINE_DEL:
compareDiffLine = diffSection.GetLine(DIFF_LINE_ADD, diffLine.LeftIdx)
if compareDiffLine == nil {
- return template.HTML(html.EscapeString(diffLine.Content[1:]))
+ return template.HTML(html.EscapeString(diffLine.Content))
}
diff1 = diffLine.Content
diff2 = compareDiffLine.Content