improve search matching even more, wow
@@ -878,7 +878,8 @@ c3nav = {
if (a[1] !== b[1]) return b[1] - a[1];
if (a[2] !== b[2]) return b[2] - a[2];
if (a[3] !== b[3]) return b[3] - a[3];
- return a[4] - b[4];
+ if (a[4] !== b[4]) return b[4] - a[4];
+ return a[5] - b[5];
},
_locationinput_input: function () {
var matches = [],
@@ -940,7 +941,7 @@ c3nav = {
}
}
- matches.push([location.elem, leading_words_count, words_total_count, words_start_count, i])
+ matches.push([location.elem, leading_words_count, words_total_count, words_start_count, -location.title.length, i])
}
matches.sort(c3nav._locationinput_matches_compare);
