Commit graph

5 commits

Author SHA1 Message Date
Sam Smith
3d9235e8fc tpl: Fix bad rounding in NumFmt
strconv.FormatFloat doesn't round properly sometimes, this adds a
different method of rounding, fixes #7116
2020-06-02 17:20:36 +02:00
Bjørn Erik Pedersen
9e57182705
tests: Convert from testify to quicktest 2019-08-12 13:26:32 +02:00
Cameron Moore
ce264b936c tpl: Add a delimiter parameter to lang.NumFmt
The original implementation of NumFmt did not take into account that the
options delimiter (a space) could be a valid option.  Adding a delim
parameter seems like the simplest, safest, and most flexible way to
solve this oversight in a backwards-compatible way.

Fixes #5260
2018-10-02 17:41:48 +03:00
Bjørn Erik Pedersen
d8717cd4c7 all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
Cameron Moore
93b3b13867 tpl/lang: Add NumFmt function
NumFmt formats a number with a given precision using the requested
decimal, grouping, and negative characters.

Fixes #1444
2017-05-18 09:49:20 +03:00