Skip to content

Commit a60f506

Browse files
authored
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
1 parent bac57ab commit a60f506

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

routers/repo/compare.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,8 @@ func ExcerptBlob(ctx *context.Context) {
605605
return
606606
}
607607
section := &gitdiff.DiffSection{
608-
Name: filePath,
608+
FileName: filePath,
609+
Name: filePath,
609610
}
610611
if direction == "up" && (idxLeft-lastLeft) > chunkSize {
611612
idxLeft -= chunkSize

0 commit comments

Comments
 (0)