mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 23:17:19 +00:00
Full-file syntax highlighting for diff pages (#33766)
Fix #33358, fix #21970 This adds a step in the `GitDiffForRender` that does syntax highlighting for the entire file and then only references lines from that syntax highlighted code. This allows things like multi-line comments to be syntax highlighted correctly. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -35,7 +35,6 @@ func TestGetDiffPreview(t *testing.T) {
|
||||
Name: "README.md",
|
||||
OldName: "README.md",
|
||||
NameHash: "8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d",
|
||||
Index: 1,
|
||||
Addition: 2,
|
||||
Deletion: 1,
|
||||
Type: 2,
|
||||
|
Reference in New Issue
Block a user