fix: move HTML handler before markup — .html files were caught by markup renderer

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-20 08:44:10 +01:00
parent adacd11e75
commit e7110bc8ba
+1 -1
View File
@@ -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