From 14d28d74730c92b0ff849c08d5e9a1de89d93178 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Mon, 15 Jun 2015 00:04:01 +0100 Subject: [PATCH] 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 --- docs/dgeni-package/processors/readTypeScriptModules.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/dgeni-package/processors/readTypeScriptModules.js b/docs/dgeni-package/processors/readTypeScriptModules.js index 5adcbc4b10..6e68c28001 100644 --- a/docs/dgeni-package/processors/readTypeScriptModules.js +++ b/docs/dgeni-package/processors/readTypeScriptModules.js @@ -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)