diff options
Diffstat (limited to 'modules/markdown/markdown.go')
-rw-r--r-- | modules/markdown/markdown.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/markdown/markdown.go b/modules/markdown/markdown.go index 1da1c5e2e8..b24fe2e40a 100644 --- a/modules/markdown/markdown.go +++ b/modules/markdown/markdown.go @@ -53,10 +53,11 @@ func isLink(link []byte) bool { // IsMarkdownFile reports whether name looks like a Markdown file // based on its extension. func IsMarkdownFile(name string) bool { - name = strings.ToLower(name) - switch filepath.Ext(name) { - case ".md", ".markdown", ".mdown", ".mkd": - return true + extension := strings.ToLower(filepath.Ext(name)) + for _, ext := range setting.Markdown.MdFileExtensions { + if strings.ToLower(ext) == extension { + return true + } } return false } |