mirror of https://github.com/go-gitea/gitea.git
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:
parent
bac57ab590
commit
a60f506dd7
|
@ -605,7 +605,8 @@ func ExcerptBlob(ctx *context.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
section := &gitdiff.DiffSection{
|
section := &gitdiff.DiffSection{
|
||||||
Name: filePath,
|
FileName: filePath,
|
||||||
|
Name: filePath,
|
||||||
}
|
}
|
||||||
if direction == "up" && (idxLeft-lastLeft) > chunkSize {
|
if direction == "up" && (idxLeft-lastLeft) > chunkSize {
|
||||||
idxLeft -= chunkSize
|
idxLeft -= chunkSize
|
||||||
|
|
Loading…
Reference in New Issue