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 | |
parent | 6696610aea48482b6c2f258cc43f595d550e7477 (diff) | |
download | gitea-9085dfa42663e826c405996a44729bb0428bb201.tar.gz gitea-9085dfa42663e826c405996a44729bb0428bb201.zip |
Working on #211
-rw-r--r-- | bee.json | 4 | ||||
-rw-r--r-- | routers/repo/repo.go | 5 |
2 files changed, 6 insertions, 3 deletions
@@ -12,8 +12,8 @@ "models": "", "others": [ "modules", - "/project/works/open/src/github.com/gogits/logs", - "/project/works/open/src/github.com/gogits/git" + "$GOPATH/src/github.com/gogits/logs", + "$GOPATH/src/github.com/gogits/git" ] }, "cmd_args": [ 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) } } } |