forked from gohugoio/hugo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With this commit ByParam takes into account a type of a value under a key. If both values are numeric then they're coerced into float64 and then get compared. If any value isn't numeric, for example it's nil or string, then both values coerced into string and get compared as strings (lexicographicaly) Nil values are always sent to the end. Numeric values confirm to any type listed below: uint8, uint16, uint32, uint64, int, int8, int16, int32, int64, float32, float64 Closes gohugoio#5305
- Loading branch information
Showing
2 changed files
with
63 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters