rustdoc: Remove crate name from primitives, make them turn up first in search
This commit is contained in:
parent
e266651a3d
commit
9256947051
1 changed files with 7 additions and 0 deletions
|
@ -386,6 +386,9 @@
|
||||||
if ((aaa.item.ty === TY_PRIMITIVE) && (bbb.item.ty !== TY_PRIMITIVE)) {
|
if ((aaa.item.ty === TY_PRIMITIVE) && (bbb.item.ty !== TY_PRIMITIVE)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
if ((bbb.item.ty === TY_PRIMITIVE) && (aaa.item.ty !== TY_PRIMITIVE)) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
// sort by description (no description goes later)
|
// sort by description (no description goes later)
|
||||||
a = (aaa.item.desc === '');
|
a = (aaa.item.desc === '');
|
||||||
|
@ -572,6 +575,10 @@
|
||||||
displayPath = item.path + '::';
|
displayPath = item.path + '::';
|
||||||
href = rootPath + item.path.replace(/::/g, '/') +
|
href = rootPath + item.path.replace(/::/g, '/') +
|
||||||
'/index.html';
|
'/index.html';
|
||||||
|
} else if (type === "primitive") {
|
||||||
|
displayPath = "";
|
||||||
|
href = rootPath + item.path.replace(/::/g, '/') +
|
||||||
|
'/' + type + '.' + name + '.html';
|
||||||
} else if (item.parent !== undefined) {
|
} else if (item.parent !== undefined) {
|
||||||
var myparent = item.parent;
|
var myparent = item.parent;
|
||||||
var anchor = '#' + type + '.' + name;
|
var anchor = '#' + type + '.' + name;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue