diff --git a/gogs.go b/gogs.go index 423d30190..1f0f15b8b 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 c7369ab9f..d3f3e5fea 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 6e3c63ed8..aa8ee543a 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