mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-09 12:28:49 +03:00
markdown: Default extensions .md, .markdown, and .mdown
This commit is contained in:
parent
d46967d1e2
commit
51d2ff4e47
2 changed files with 4 additions and 4 deletions
|
@ -78,9 +78,9 @@ func markdownParse(c *Controller) ([]*markdown.Config, error) {
|
|||
}
|
||||
}
|
||||
|
||||
// If no extensions were specified, assume .md
|
||||
// If no extensions were specified, assume some defaults
|
||||
if len(md.Extensions) == 0 {
|
||||
md.Extensions = []string{".md"}
|
||||
md.Extensions = []string{".md", ".markdown", ".mdown"}
|
||||
}
|
||||
|
||||
mdconfigs = append(mdconfigs, md)
|
||||
|
|
|
@ -37,8 +37,8 @@ func TestMarkdown(t *testing.T) {
|
|||
if myHandler.Configs[0].PathScope != "/blog" {
|
||||
t.Errorf("Expected /blog as the Path Scope")
|
||||
}
|
||||
if fmt.Sprint(myHandler.Configs[0].Extensions) != fmt.Sprint([]string{".md"}) {
|
||||
t.Errorf("Expected .md as the Default Extension")
|
||||
if fmt.Sprint(myHandler.Configs[0].Extensions) != fmt.Sprint([]string{".md", ".markdown", ".mdown"}) {
|
||||
t.Errorf("Expected .md, .markdown, and .mdown as default extensions")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue