diff options
Diffstat (limited to 'modules/markup')
-rw-r--r-- | modules/markup/markup.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/markup/markup.go b/modules/markup/markup.go index 0847fcfb0d..dc27997e8d 100644 --- a/modules/markup/markup.go +++ b/modules/markup/markup.go @@ -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 { |