Skip to content

Commit

Permalink
Fix docs generator search use html_id (#10875)
Browse files Browse the repository at this point in the history
This fixes a regression from #10109 which removed the id property
  • Loading branch information
straight-shoota authored Jul 3, 2021
1 parent 7e94d52 commit 2c833ae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/compiler/crystal/tools/doc/html/js/_search.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CrystalDocs.runQuery = function(query) {
}
if (matches.length > 0) {
results.push({
id: type.id,
id: type.html_id,
result_type: "type",
kind: type.kind,
name: name,
Expand Down Expand Up @@ -92,14 +92,14 @@ CrystalDocs.runQuery = function(query) {
matches = matches.concat(typeMatches);
}
results.push({
id: method.id,
id: method.html_id,
type: type.full_name,
result_type: kind,
name: method.name,
full_name: type.full_name + "#" + method.name,
args_string: method.args_string,
summary: method.summary,
href: type.path + "#" + method.id,
href: type.path + "#" + method.html_id,
matched_fields: matchedFields,
matched_terms: matches
});
Expand All @@ -126,14 +126,14 @@ CrystalDocs.runQuery = function(query) {
matches = matches.concat(typeMatches);
}
results.push({
id: constant.id,
id: constant.html_id,
type: type.full_name,
result_type: "constant",
name: constant.name,
full_name: type.full_name + "#" + constant.name,
value: constant.value,
summary: constant.summary,
href: type.path + "#" + constant.id,
href: type.path + "#" + constant.html_id,
matched_fields: matchedFields,
matched_terms: matches
});
Expand Down

0 comments on commit 2c833ae

Please sign in to comment.