Skip to content

Commit d7dbe4f

Browse files
authored
Fix readme render bug (#15649)
1 parent 2c57352 commit d7dbe4f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

routers/repo/view.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
512512
}
513513
ctx.Data["FileContent"] = result.String()
514514
} else if readmeExist {
515+
buf, _ := ioutil.ReadAll(rd)
515516
ctx.Data["IsRenderedHTML"] = true
516517
ctx.Data["FileContent"] = strings.ReplaceAll(
517518
gotemplate.HTMLEscapeString(string(buf)), "\n", `<br>`,

0 commit comments

Comments
 (0)