aboutsummaryrefslogtreecommitdiff
path: root/templates/repo/view_list.tmpl
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-01-25 07:10:52 -0500
committerUnknwon <u@gogs.io>2017-01-25 07:10:52 -0500
commit8cb903fbbb6de5decb443af1481b44b5c1a426d1 (patch)
tree78c577d42471344c06a876609c5766689f3758c1 /templates/repo/view_list.tmpl
parentd1c327d508e5d3c1ad9237ccf7c7d5b6cc21be8a (diff)
Fix unexpected rendering of README when it is not in Markdown
This patch also handles case when a file name looks like README but is not a text file (e.g. image, PDF).
Diffstat (limited to 'templates/repo/view_list.tmpl')
-rw-r--r--templates/repo/view_list.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl
index 0881ce99..f532dd74 100644
--- a/templates/repo/view_list.tmpl
+++ b/templates/repo/view_list.tmpl
@@ -52,6 +52,6 @@
{{end}}
</tbody>
</table>
-{{if .ReadmeExist}}
+{{if and .ReadmeExist .IsTextFile}}
{{template "repo/view_file" .}}
{{end}}