0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00

markdown: backup title should use TrimSuffix, not TrimRight (#1515)

This commit is contained in:
Chao Huang 2017-03-13 17:24:03 -04:00 committed by Matt Holt
parent d85e90a7b4
commit 36a62f0915

View file

@ -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))
}