diff options
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/repo.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 5a200bae..a5a0b2aa 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -252,7 +252,10 @@ func Single(ctx *middleware.Context, params martini.Params) { if isTextFile { d, _ := ioutil.ReadAll(dataRc) buf = append(buf, d...) - ctx.Data["FileContent"] = string(base.RenderMarkdown(buf, branchLink)) + if base.IsMarkdownFile(readmeFile.Name()) { + buf = base.RenderMarkdown(buf, branchLink) + } + ctx.Data["FileContent"] = string(buf) } } } |