diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-12-25 00:51:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-25 00:51:13 +0800 |
commit | b7260400f80073648d3491ce667de967668d72a8 (patch) | |
tree | 9a3c74e9837f7925e449442d0f9cec2528c3b5dc /routers/web/repo | |
parent | 2a828e2798d5f77e768e1199d88a00996bd3e45a (diff) | |
download | gitea-b7260400f80073648d3491ce667de967668d72a8.tar.gz gitea-b7260400f80073648d3491ce667de967668d72a8.zip |
Refactor tmpl and blob_excerpt (#32967)
1. do not use `{{/* */}}` to remove spaces, use `{{- -}}`
2. fix "blob_excerpt" endpoint, remove the legacy fragile code: have
tested commit diff and wiki diff
Diffstat (limited to 'routers/web/repo')
-rw-r--r-- | routers/web/repo/compare.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/compare.go b/routers/web/repo/compare.go index 6c59421bda..8c4003690a 100644 --- a/routers/web/repo/compare.go +++ b/routers/web/repo/compare.go @@ -864,7 +864,7 @@ func ExcerptBlob(ctx *context.Context) { direction := ctx.FormString("direction") filePath := ctx.FormString("path") gitRepo := ctx.Repo.GitRepo - if ctx.FormBool("wiki") { + if ctx.Data["PageIsWiki"] == true { var err error gitRepo, err = gitrepo.OpenWikiRepository(ctx, ctx.Repo.Repository) if err != nil { |