mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
if a symbol shares its longname with a module, only show the symbol if it either a) has a description or b) is a class (#853)
This commit is contained in:
parent
8d9134015f
commit
0080e5f99f
@ -269,15 +269,21 @@ function attachModuleSymbols(doclets, modules) {
|
||||
|
||||
return modules.map(function(module) {
|
||||
if (symbols[module.longname]) {
|
||||
module.modules = symbols[module.longname].map(function(symbol) {
|
||||
symbol = doop(symbol);
|
||||
module.modules = symbols[module.longname]
|
||||
// Only show symbols that have a description. Make an exception for classes, because
|
||||
// we want to show the constructor-signature heading no matter what.
|
||||
.filter(function(symbol) {
|
||||
return symbol.description || symbol.kind === 'class';
|
||||
})
|
||||
.map(function(symbol) {
|
||||
symbol = doop(symbol);
|
||||
|
||||
if (symbol.kind === 'class' || symbol.kind === 'function') {
|
||||
symbol.name = symbol.name.replace('module:', '(require("') + '"))';
|
||||
}
|
||||
if (symbol.kind === 'class' || symbol.kind === 'function') {
|
||||
symbol.name = symbol.name.replace('module:', '(require("') + '"))';
|
||||
}
|
||||
|
||||
return symbol;
|
||||
});
|
||||
return symbol;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user