Sort manual search results shortest to longest

This commit is contained in:
David Tolnay committed 2015-10-12 22:35:37 -07:00
1 parent 0791261f07
commit c2395f0278
1 file changed
+4
+4
View File
@@ -6,6 +6,10 @@ var section_names = function(q, cb) {
matches.push(k);
}
});
matches.sort(function(a, b) {
// shortest to longest
return a.length - b.length;
});
cb(matches);
}
var go_to_section = function(section) {