瀏覽代碼

Syntax highlight expanded code blobs (#12223)

Expanded code in diffs wasn't being highlighted properly because it wasn't passing the filename to highlighting code.

Fixes #12218
tags/v1.13.0-rc1
mrsdizzie 3 年之前
父節點
當前提交
a60f506dd7
No account linked to committer's email address
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2
    1
      routers/repo/compare.go

+ 2
- 1
routers/repo/compare.go 查看文件

@@ -605,7 +605,8 @@ func ExcerptBlob(ctx *context.Context) {
return
}
section := &gitdiff.DiffSection{
Name: filePath,
FileName: filePath,
Name: filePath,
}
if direction == "up" && (idxLeft-lastLeft) > chunkSize {
idxLeft -= chunkSize

Loading…
取消
儲存