aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo/repo.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-29 22:09:50 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-29 22:09:50 -0400
commit9085dfa42663e826c405996a44729bb0428bb201 (patch)
treec688677698b259128f238169be4276f1841b4be5 /routers/repo/repo.go
parent6696610aea48482b6c2f258cc43f595d550e7477 (diff)
downloadgitea-9085dfa42663e826c405996a44729bb0428bb201.tar.gz
gitea-9085dfa42663e826c405996a44729bb0428bb201.zip
Working on #211
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r--routers/repo/repo.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index 5a200bae61..a5a0b2aa26 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)
}
}
}