Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion assets/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export function findIn (elements, matcher) {
var functionMatches = findNested(element.functions, id, matcher)
var macroMatches = findNested(element.macros, id, matcher)
var callbackMatches = findNested(element.callbacks, id, matcher)
var typeMatches = findNested(element.types, id, matcher)

var result = {
id: element.id,
Expand All @@ -65,11 +66,13 @@ export function findIn (elements, matcher) {
if (functionMatches.length > 0) result.functions = functionMatches
if (macroMatches.length > 0) result.macros = macroMatches
if (callbackMatches.length > 0) result.callbacks = callbackMatches
if (typeMatches.length > 0) result.types = typeMatches

if (idMatch ||
functionMatches.length > 0 ||
macroMatches.length > 0 ||
callbackMatches.length > 0
callbackMatches.length > 0 ||
typeMatches.length > 0
) {
return result
}
Expand Down
5 changes: 5 additions & 0 deletions assets/js/templates/search-results.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
<li class="result-elem"><a href="{{../id}}.html#{{{anchor}}}">{{{match}}}</a> (callback)</li>
{{/each}}
</ul>
<ul class="types">
{{#each types}}
<li class="result-elem"><a href="{{../id}}.html#{{{anchor}}}">{{{match}}}</a> (type)</li>
{{/each}}
</ul>
</div>
{{/each}}
{{/each}}
Expand Down