chore(doc-gen): fix id and alias generation for exports and members

This helps to ensure that links to exports are not confused with links
to members, which was causing some missing link issues.

Helps #2475
This commit is contained in:
Peter Bacon Darwin 2015-06-15 00:04:01 +01:00
parent 992293a196
commit 14d28d7473
1 changed files with 3 additions and 3 deletions

View File

@ -147,15 +147,16 @@ module.exports = function readTypeScriptModules(tsParser, readFilesProcessor, mo
});
//Make sure duplicate aliases aren't created, so "Ambiguous link" warnings are prevented
var aliasNames = [name];
var aliasNames = [name, moduleDoc.id + '/' + name];
if (typeParamString) {
aliasNames.push(name + typeParamString);
aliasNames.push(moduleDoc.id + '/' + name + typeParamString);
}
var exportDoc = {
docType: getExportDocType(exportSymbol),
name: name,
id: name,
id: moduleDoc.id + '/' + name,
typeParams: typeParamString,
heritage: heritageString,
aliases: aliasNames,
@ -178,7 +179,6 @@ module.exports = function readTypeScriptModules(tsParser, readFilesProcessor, mo
docType: 'member',
classDoc: classDoc,
name: memberSymbol.name,
id: memberSymbol.name,
content: getContent(memberSymbol),
fileInfo: getFileInfo(memberSymbol, basePath),
location: getLocation(memberSymbol)