tpl: Modify tpl.humanize to ordinalize integer input
authorMichael Orr <michael@orr.co>
Wed, 13 Jul 2016 20:09:59 +0000 (14:09 -0600)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 13 Jul 2016 20:09:59 +0000 (22:09 +0200)
commit0a812beb120620ad2bdc8b1504bb7edf6eaac18a
tree644521a9c2200860b3d36887711b473c26f27f2c
parent330639d2aefbcaef4106653617fe8b518eb0711e
tpl: Modify tpl.humanize to ordinalize integer input

Add logic to tpl.humanize such that it understands input of int literals
or strings which represent an integer. When tpl.humanize sees this type
of input, it will use inflect.Ordinalize as opposed to the standard
inflect.Humanize.

Fixes #1886
docs/content/templates/functions.md
tpl/template_funcs.go
tpl/template_funcs_test.go