From 9085dfa42663e826c405996a44729bb0428bb201 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 29 May 2014 22:09:50 -0400 Subject: [PATCH] Working on #211 --- bee.json | 4 ++-- routers/repo/repo.go | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bee.json b/bee.json index dea9261632..15820ab9f2 100644 --- a/bee.json +++ b/bee.json @@ -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) } } }