fix multiple readme file rendering and fix #1657 (#1658)

* fix multiple readme file rendering and fix #1657

* remove unnecessary loop
This commit is contained in:
Lunny Xiao 2017-05-02 16:57:54 +08:00 committed by Bo-Yi Wu
parent 98548c83d3
commit 0d1e001b9c
2 changed files with 18 additions and 3 deletions

View file

@ -59,6 +59,15 @@ func Type(filename string) string {
return ""
}
// ReadmeFileType reports whether name looks like a README file
// based on its name and find the parser via its ext name
func ReadmeFileType(name string) (string, bool) {
if IsReadmeFile(name) {
return Type(name), true
}
return "", false
}
// IsReadmeFile reports whether name looks like a README file
// based on its name.
func IsReadmeFile(name string) bool {