when computing sort values, only strip non-word characters from the beginning of the value if the result is not an empty string

This commit is contained in:
rolux 2012-10-26 18:16:44 +02:00
parent 23bd717a8a
commit 4ef16ef92d

View file

@ -598,7 +598,7 @@ Ox.range = function() {
var getSortValue = Ox.cache(function getSortValue(value) {
var sortValue = value;
function trim(value) {
return value.replace(/^\W+/, '');
return value.replace(/^\W+(?=\w)/, '');
}
if (
Ox.isEmpty(value)