Change prettyname of classes
Now also includes the class name if it is different than its module name. `ol/source/Vector` -> `ol/source/Vector~VectorSource`.
This commit is contained in:
@@ -189,9 +189,15 @@ function attachModuleSymbols(doclets, modules) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getPrettyName(longname) {
|
function getPrettyName(longname) {
|
||||||
return longname
|
const fullname = longname.replace('module:', '');
|
||||||
.split('~')[0]
|
const parts = fullname.split(/[~\.]/);
|
||||||
.replace('module:', '');
|
if (parts.length > 1) {
|
||||||
|
const pathParts = parts[0].split('/');
|
||||||
|
if (parts[parts.length - 1] === pathParts[pathParts.length - 1]) {
|
||||||
|
return parts[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return fullname;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user