mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
Add trim and replace template functions
This commit is contained in:
@@ -1237,6 +1237,8 @@ func init() {
|
||||
"relref": RelRef,
|
||||
"apply": Apply,
|
||||
"chomp": Chomp,
|
||||
"replace": func(a string, b string, c string) string { return strings.Replace(a, b, c, -1) },
|
||||
"trim": func(a string, b string) string { return strings.Trim(a, b) },
|
||||
}
|
||||
|
||||
chompRegexp = regexp.MustCompile("[\r\n]+$")
|
||||
|
Reference in New Issue
Block a user