( results, resultCount, searchTerms, highlightTerms, )
| 142 | ).replace("${resultCount}", resultCount); |
| 143 | }; |
| 144 | const _displayNextItem = ( |
| 145 | results, |
| 146 | resultCount, |
| 147 | searchTerms, |
| 148 | highlightTerms, |
| 149 | ) => { |
| 150 | // results left, load the summary and display it |
| 151 | // this is intended to be dynamic (don't sub resultsCount) |
| 152 | if (results.length) { |
| 153 | _displayItem(results.pop(), searchTerms, highlightTerms); |
| 154 | setTimeout( |
| 155 | () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), |
| 156 | 5, |
| 157 | ); |
| 158 | } |
| 159 | // search finished, update title and status message |
| 160 | else _finishSearch(resultCount); |
| 161 | }; |
| 162 | // Helper function used by query() to order search results. |
| 163 | // Each input is an array of [docname, title, anchor, descr, score, filename, kind]. |
| 164 | // Order the results by score (in opposite order of appearance, since the |
no test coverage detected