diff --git a/routers/web/repo/view_file.go b/routers/web/repo/view_file.go index 7c37f249fb..8ccb55b539 100644 --- a/routers/web/repo/view_file.go +++ b/routers/web/repo/view_file.go @@ -252,8 +252,8 @@ func prepareFileView(ctx *context.Context, entry *git.TreeEntry) { switch { case fInfo.blobOrLfsSize >= setting.UI.MaxDisplayFileSize: ctx.Data["IsFileTooLarge"] = true - case handleFileViewRenderMarkup(ctx, buf, contentReader): case handleFileViewRenderHTML(ctx, fInfo): + case handleFileViewRenderMarkup(ctx, buf, contentReader): case handleFileViewRenderSource(ctx, attrs, fInfo, contentReader): // it also sets ctx.Data["FileContent"] and more ctx.Data["IsDisplayingSource"] = true