mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Misc doc, code refactoring to improve documentation
This commit is contained in:
@@ -39,9 +39,9 @@ type htmlTag struct {
|
||||
openTag bool
|
||||
}
|
||||
|
||||
// Truncate truncates a given string to the specified length.
|
||||
func (ns *Namespace) Truncate(a any, options ...any) (template.HTML, error) {
|
||||
length, err := cast.ToIntE(a)
|
||||
// Truncate truncates the string in s to the specified length.
|
||||
func (ns *Namespace) Truncate(s any, options ...any) (template.HTML, error) {
|
||||
length, err := cast.ToIntE(s)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
Reference in New Issue
Block a user