aboutsummaryrefslogtreecommitdiffstats
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
parent6696610aea48482b6c2f258cc43f595d550e7477 (diff)
downloadgitea-9085dfa42663e826c405996a44729bb0428bb201.tar.gz
gitea-9085dfa42663e826c405996a44729bb0428bb201.zip
Working on #211
-rw-r--r--bee.json4
-rw-r--r--routers/repo/repo.go5
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)
}
}
}