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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user