Commit Graph

4 Commits

Author SHA1 Message Date
Harvey Tindall
0b43ad4ed5 template: passed var and conditional names don't include braces
pass []string{"username"}, rather than []string{"{username}"}. Tests
have been updated.
2025-08-23 14:59:04 +01:00
Harvey Tindall
5d49a56d94 template: add tests, fix up easy holes
should cope with double-braced blocks now (treating them the same as
single-braced. templateEmail now returns an error, which should not be
seen as catastrophic, but reports likely mistakes.
2025-08-03 17:36:33 +01:00
Harvey Tindall
90a2c1f2e7 Fix email editor for other email types 2021-04-22 19:16:41 +01:00
Harvey Tindall
f7d2771263 add email templater with basic if statements
at this point I really should've just used text/template, but I guess
this way compatibility is kept with existing custom emails. If statement
works as so:

{if variable}variable was true{endif}
{if !variable}variable was false{endif}

no else yet, just do as above (two if statements).
2021-04-14 23:58:54 +01:00