-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix plain readme didn't render correctly on repo home page #2705
Conversation
f8498bb
to
1a452f3
Compare
Codecov Report
@@ Coverage Diff @@
## master #2705 +/- ##
=======================================
Coverage 26.95% 26.95%
=======================================
Files 87 87
Lines 17301 17301
=======================================
Hits 4664 4664
Misses 11957 11957
Partials 680 680 Continue to review full report at Codecov.
|
@lunny I don't know why but integration tests fail |
@lafriks I think I find the problem, sent another commit. |
routers/repo/view.go
Outdated
@@ -93,6 +93,7 @@ func renderDirectory(ctx *context.Context, treeLink string) { | |||
if isTextFile { | |||
d, _ := ioutil.ReadAll(dataRc) | |||
buf = append(buf, d...) | |||
ctx.Data["IsRenderedHTML"] = true | |||
newbuf := markup.Render(readmeFile.Name(), buf, treeLink, ctx.Repo.Repository.ComposeMetas()) | |||
if newbuf != nil { | |||
ctx.Data["IsMarkup"] = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ctx.Data["IsMarkup"]
is not needed anymore?
b795e7d
to
dee2f54
Compare
@Morlinest done. |
LGTM |
LGTM |
…2705) * fix plain readme didn't render correctly on repo home page * fix missing render * remove unused template variables
will fix #2701