Browse Source

Working on #211

for-closed-social
Unknown 10 years ago
parent
commit
9085dfa426
2 changed files with 6 additions and 3 deletions
  1. +2
    -2
      bee.json
  2. +4
    -1
      routers/repo/repo.go

+ 2
- 2
bee.json View File

@ -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": [

+ 4
- 1
routers/repo/repo.go View File

@ -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)
}
}
}

Loading…
Cancel
Save