Merge pull request #11274 from wujunwei/fix-case-title-smaller-all

bugfix: add cases.NoLower opt for we can get same effect to strings.Title
pull/11377/head
Martin Hickey 2 years ago committed by GitHub
commit a48b87f32a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -86,7 +86,7 @@ func (o *docsOptions) run(out io.Writer) error {
hdrFunc := func(filename string) string {
base := filepath.Base(filename)
name := strings.TrimSuffix(base, path.Ext(base))
title := cases.Title(language.Und).String(strings.Replace(name, "_", " ", -1))
title := cases.Title(language.Und, cases.NoLower).String(strings.Replace(name, "_", " ", -1))
return fmt.Sprintf("---\ntitle: \"%s\"\n---\n\n", title)
}

Loading…
Cancel
Save