aboutsummaryrefslogtreecommitdiffstats
path: root/lib/templates/functions_test.go
Commit message (Collapse)AuthorAgeFilesLines
* templates: process reversed names betterVitaly Ovchinnikov2023-06-291-0/+123
Change the behavior of `names`, `firstnames` and `initials` functions in templates so they better process names formatted like this: "Last Name, First Name" Basically, if the name contains one (and only one) comma, its parts are flipped so the first name always goes first. This helps to do "Hello Name" in templates regardless of the name format in email address. Also if the template uses a full name it will make it "Hello FirstName LastName" instead of "Hello LastName, FirstName". Add tests to cover more complex names in the future. Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz> Acked-by: Robin Jarry <robin@jarry.cc>