mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-12 20:13:59 +02:00
helpers: Remove unusded WordCount
This commit is contained in:
@@ -421,16 +421,6 @@ func totalWordsOld(s string) int {
|
||||
return len(strings.Fields(s))
|
||||
}
|
||||
|
||||
// WordCount takes content and returns a map of words and count of each word.
|
||||
func WordCount(s string) map[string]int {
|
||||
m := make(map[string]int)
|
||||
for _, f := range strings.Fields(s) {
|
||||
m[f]++
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
// TruncateWordsByRune truncates words by runes.
|
||||
func TruncateWordsByRune(words []string, max int) (string, bool) {
|
||||
count := 0
|
||||
|
Reference in New Issue
Block a user