summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2015-10-12 22:33:45 -0700
committerDavid Tolnay <dtolnay@gmail.com>2015-10-12 22:35:37 -0700
commitc2395f027882beed4d00f79e125afa30bcd367c6 (patch)
tree9a8e86b41a14313633164cda1e27fad6af5aa9a7 /docs
parent0791261f072c5d9563e5a11caa418511f0823067 (diff)
Sort manual search results shortest to longest
Diffstat (limited to 'docs')
-rw-r--r--docs/public/js/manual-search.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/public/js/manual-search.js b/docs/public/js/manual-search.js
index 396f2e0d..c2b13dec 100644
--- a/docs/public/js/manual-search.js
+++ b/docs/public/js/manual-search.js
@@ -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) {