Merge pull request #856 from itantik/patch-1

Fix tutorial-linking issue caused by #813 (#856)
This commit is contained in:
Jeff Williams 2014-12-30 13:58:24 -08:00
commit fcded9cc11

View File

@ -288,15 +288,18 @@ function attachModuleSymbols(doclets, modules) {
});
}
function buildMemberNav(items, itemHeading, itemsSeen) {
function buildMemberNav(items, itemHeading, itemsSeen, linktoFn) {
var nav = '';
if (items.length) {
var itemsNav = '';
items.forEach(function(item) {
if ( !hasOwnProp.call(itemsSeen, item.longname) ) {
itemsNav += '<li>' + linkto(item.longname, item.name.replace(/^module:/, '')) + '</li>';
if ( !hasOwnProp.call(item, 'longname') ) {
itemsNav += '<li>' + linktoFn('', item.name) + '</li>';
}
else if ( !hasOwnProp.call(itemsSeen, item.longname) ) {
itemsNav += '<li>' + linktoFn(item.longname, item.name.replace(/^module:/, '')) + '</li>';
itemsSeen[item.longname] = true;
}
});