fix(docs): ensure no duplicates in alias names of docs
Having multiple identical names in a doc's aliases would cause Ambiguous Link warnings for each reference to one of the aliases. Related to #2452
This commit is contained in:
parent
796fc66771
commit
05d02fa90b
@ -146,13 +146,19 @@ module.exports = function readTypeScriptModules(tsParser, readFilesProcessor, mo
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Make sure duplicate aliases aren't created, so "Ambiguous link" warnings are prevented
|
||||||
|
var aliasNames = [name];
|
||||||
|
if (typeParamString) {
|
||||||
|
aliasNames.push(name + typeParamString);
|
||||||
|
}
|
||||||
|
|
||||||
var exportDoc = {
|
var exportDoc = {
|
||||||
docType: getExportDocType(exportSymbol),
|
docType: getExportDocType(exportSymbol),
|
||||||
name: name,
|
name: name,
|
||||||
id: name,
|
id: name,
|
||||||
typeParams: typeParamString,
|
typeParams: typeParamString,
|
||||||
heritage: heritageString,
|
heritage: heritageString,
|
||||||
aliases: [name, name + typeParamString],
|
aliases: aliasNames,
|
||||||
moduleDoc: moduleDoc,
|
moduleDoc: moduleDoc,
|
||||||
content: getContent(exportSymbol),
|
content: getContent(exportSymbol),
|
||||||
fileInfo: getFileInfo(exportSymbol, basePath),
|
fileInfo: getFileInfo(exportSymbol, basePath),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user