Update search-result-impl-disambiguation.goml
This commit is contained in:
parent
20b93b951a
commit
2a4c9d0756
2 changed files with 4 additions and 4 deletions
|
@ -354,13 +354,13 @@ function preLoadCss(cssUrl) {
|
|||
expandSection(pageId);
|
||||
}
|
||||
}
|
||||
if (savedHash.startsWith("#impl-")) {
|
||||
if (savedHash.startsWith("impl-")) {
|
||||
// impl-disambiguated links, used by the search engine
|
||||
// format: impl-X[-for-Y]/method.WHATEVER
|
||||
// turn this into method.WHATEVER[-NUMBER]
|
||||
const splitAt = savedHash.indexOf("/");
|
||||
if (splitAt !== -1) {
|
||||
const implId = savedHash.slice(1, splitAt);
|
||||
const implId = savedHash.slice(0, splitAt);
|
||||
const assocId = savedHash.slice(splitAt + 1);
|
||||
const implElem = document.getElementById(implId);
|
||||
if (implElem && implElem.parentElement.tagName === "SUMMARY" &&
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// Checks that, if a type has two methods with the same name, they both get
|
||||
// linked correctly.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
|
||||
// This should link to the inherent impl
|
||||
write: (".search-input", "ZyxwvutMethodDisambiguation -> bool")
|
||||
|
@ -22,7 +22,7 @@ assert-document-property: ({
|
|||
}, ENDS_WITH)
|
||||
assert: "section:target"
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
|
||||
// This should link to the trait impl
|
||||
write: (".search-input", "ZyxwvutMethodDisambiguation, usize -> usize")
|
||||
|
|
Loading…
Add table
Reference in a new issue