Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport numeric sort in ByParam #5305
Comments
bep
changed the title
Order ByParam results in wrong order with int comparations
Supprt numeric sort in ByParam
Oct 11, 2018
bep
added
the
Enhancement
label
Oct 11, 2018
This comment has been minimized.
This comment has been minimized.
I suggest we do a variant of the above.
With that, I suggest that: If both are numbers, convert both to float64 and compare them. |
moorereason
changed the title
Supprt numeric sort in ByParam
Support numeric sort in ByParam
Oct 11, 2018
added a commit
to tryzniak/hugo
that referenced
this issue
Jan 15, 2019
added a commit
to tryzniak/hugo
that referenced
this issue
Jan 15, 2019
bep
closed this
in
#5606
Jan 20, 2019
added a commit
that referenced
this issue
Jan 20, 2019
This comment has been minimized.
This comment has been minimized.
Nice, thanks |
bep
modified the milestones:
v0.53.1,
v0.54
Feb 1, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
smiileTeam commentedOct 11, 2018
•
edited
hugo/hugolib/pageSort.go
Line 295 in f1a00b2
On this method, each value is cast to string so a compare beetwen (int) 9 and (int) 12 gives us 9 result first (instead of 12).
We would love to:
or
or