generated docs: sort search results

master
Andrew Kelley 2019-10-07 18:17:06 -04:00
parent 478e53911d
commit 15471531d0
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
1 changed files with 4 additions and 0 deletions

View File

@ -633,6 +633,10 @@
if (matchedItems.length !== 0) {
resizeDomList(domListSearchResults, matchedItems.length, '<li><a href="#"></a></li>');
matchedItems.sort(function(a, b) {
return operatorCompare(a.decl.name, b.decl.name);
});
for (var i = 0; i < matchedItems.length; i += 1) {
var liDom = domListSearchResults.children[i];
var aDom = liDom.children[0];