mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
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
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user