zk/adapter/handlebars/helpers/concat.go
2021-01-30 19:30:46 +01:00

17 lines
308 B
Go

package helpers
import (
"github.com/aymerick/raymond"
)
// RegisterConcat registers a {{concat}} template helper which concatenates two
// strings.
//
// {{concat '> ' 'A quote'}} -> "> A quote"
//
func RegisterConcat() {
raymond.RegisterHelper("concat", func(a, b string) string {
return a + b
})
}