diff --git a/modules/base/tool.go b/modules/base/tool.go index ebbff8671..8145522e2 100644 --- a/modules/base/tool.go +++ b/modules/base/tool.go @@ -285,7 +285,7 @@ func Subtract(left interface{}, right interface{}) interface{} { // EllipsisString returns a truncated short string, // it appends '...' in the end of the length of string is too large. func EllipsisString(str string, length int) string { - if utf8.RuneCountInString(str) <= 3 { + if length <= 3 { return "..." } if utf8.RuneCountInString(str) <= length {