aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gogs.go2
-rw-r--r--modules/base/markdown.go8
-rw-r--r--templates/.VERSION2
3 files changed, 9 insertions, 3 deletions
diff --git a/gogs.go b/gogs.go
index 423d3019..1f0f15b8 100644
--- a/gogs.go
+++ b/gogs.go
@@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
-const APP_VER = "0.5.12.0201 Beta"
+const APP_VER = "0.5.12.0202 Beta"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
diff --git a/modules/base/markdown.go b/modules/base/markdown.go
index c7369ab9..d3f3e5fe 100644
--- a/modules/base/markdown.go
+++ b/modules/base/markdown.go
@@ -63,12 +63,18 @@ func IsImageFile(data []byte) (string, bool) {
return contentType, false
}
+// IsReadmeFile returns true if given file name suppose to be a README file.
func IsReadmeFile(name string) bool {
name = strings.ToLower(name)
if len(name) < 6 {
return false
+ } else if len(name) == 6 {
+ if name == "readme" {
+ return true
+ }
+ return false
}
- if name[:6] == "readme" {
+ if name[:7] == "readme." {
return true
}
return false
diff --git a/templates/.VERSION b/templates/.VERSION
index 6e3c63ed..aa8ee543 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.5.12.0201 Beta \ No newline at end of file
+0.5.12.0202 Beta \ No newline at end of file