diff options
author | mrsdizzie <info@mrsdizzie.com> | 2020-07-12 14:25:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-12 21:25:05 +0300 |
commit | a60f506dd7217b6a6c7ea6934e308c91cd9dabac (patch) | |
tree | d16e24c0975af1c2488d04a53b2ee139233b414a | |
parent | bac57ab5900672357fb0a36f9433e516088bd21b (diff) | |
download | gitea-a60f506dd7217b6a6c7ea6934e308c91cd9dabac.tar.gz gitea-a60f506dd7217b6a6c7ea6934e308c91cd9dabac.zip |
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
-rw-r--r-- | routers/repo/compare.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/repo/compare.go b/routers/repo/compare.go index 0ee0b0f73b..fb78ebdeac 100644 --- a/routers/repo/compare.go +++ b/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 |