mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-16 13:34:48 +02:00
strings.Title works better than cases.Title
This commit is contained in:
1
go.mod
1
go.mod
@@ -17,7 +17,6 @@ require (
|
||||
golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b
|
||||
golang.org/x/image v0.11.0
|
||||
golang.org/x/sys v0.11.0
|
||||
golang.org/x/text v0.12.0
|
||||
howett.net/plist v1.0.0
|
||||
)
|
||||
|
||||
|
||||
1
go.sum
1
go.sum
@@ -98,7 +98,6 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
|
||||
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
|
||||
@@ -30,8 +30,6 @@ import (
|
||||
"golang.org/x/exp/maps"
|
||||
"golang.org/x/exp/slices"
|
||||
"golang.org/x/sys/unix"
|
||||
"golang.org/x/text/cases"
|
||||
"golang.org/x/text/language"
|
||||
)
|
||||
|
||||
var _ = fmt.Print
|
||||
@@ -790,8 +788,7 @@ func ThemeNameFromFileName(fname string) string {
|
||||
fname = fname[:len(fname)-len(path.Ext(fname))]
|
||||
fname = strings.ReplaceAll(fname, "_", " ")
|
||||
fname = camel_case_pat().ReplaceAllString(fname, "$1 $2")
|
||||
c := cases.Title(language.English)
|
||||
return strings.Join(utils.Map(c.String, strings.Split(fname, " ")), " ")
|
||||
return strings.Join(utils.Map(strings.Title, strings.Split(fname, " ")), " ")
|
||||
}
|
||||
|
||||
func (self *Themes) Len() int { return len(self.name_map) }
|
||||
|
||||
Reference in New Issue
Block a user