add noteq

This commit is contained in:
orangix
2026-01-19 17:08:15 +01:00
parent 3f40c25b04
commit 189ebeefde
2 changed files with 18 additions and 2 deletions

17
render/helpers.go Normal file
View File

@@ -0,0 +1,17 @@
package render
import "github.com/mailgun/raymond/v2"
func (r *renderer) registerHelpers() {
funcmap := map[string]any{
"noteq": noteq,
}
raymond.RegisterHelpers(funcmap)
}
func noteq(a, b any, options *raymond.Options) any {
if raymond.Str(a) != raymond.Str(b) {
return options.Fn()
}
return ""
}