diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-29 22:09:50 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-29 22:09:50 -0400 |
commit | 9085dfa42663e826c405996a44729bb0428bb201 (patch) | |
tree | c688677698b259128f238169be4276f1841b4be5 /routers/repo/repo.go | |
parent | 6696610aea48482b6c2f258cc43f595d550e7477 (diff) | |
download | gitea-9085dfa42663e826c405996a44729bb0428bb201.tar.gz gitea-9085dfa42663e826c405996a44729bb0428bb201.zip |
Working on #211
Diffstat (limited to 'routers/repo/repo.go')
-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 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) } } } |