Browse Source
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
for-closed-social
mrsdizzie
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
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 |
|
|
|