From 36a62f09150980b00e8a19eefa479273e21cd86d Mon Sep 17 00:00:00 2001 From: Chao Huang Date: Mon, 13 Mar 2017 17:24:03 -0400 Subject: [PATCH] markdown: backup title should use TrimSuffix, not TrimRight (#1515) --- caddyhttp/markdown/markdown.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caddyhttp/markdown/markdown.go b/caddyhttp/markdown/markdown.go index 933e5af7..d48561a6 100644 --- a/caddyhttp/markdown/markdown.go +++ b/caddyhttp/markdown/markdown.go @@ -167,5 +167,5 @@ func latest(t ...time.Time) time.Time { // title gives a backup generated title for a page func title(p string) string { - return strings.TrimRight(path.Base(p), path.Ext(p)) + return strings.TrimSuffix(path.Base(p), path.Ext(p)) }