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