0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-19 00:11:24 +01:00

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
This commit is contained in:
mrsdizzie 2020-07-12 14:25:05 -04:00 committed by GitHub
parent bac57ab590
commit a60f506dd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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