code: function renderLink(href, title, text) {
      var renderOpts;
  
      if (typeof href !== 'object') {
        renderOpts = this.options; // this -> marked renderer
      }
      else {
        renderOpts = href;
        href = esc(renderOpts.href);
        title = esc(renderOpts.title);
        text = esc(renderOpts.text);
      }
  
      // lookup page before munging href
      var page = generator.page$[href];
  
      var target = '';
  
      if (opts.linkNewWindow && /^http/i.test(href)) {
        target = ' target="_blank"';
      }
      else if (/\^$/.test(u.str(title))) {
        title = title.slice(0,-1);
        target = ' target="_blank"';
      }
  
      href = rewriteLink(href, renderOpts);
  
      if (renderOpts.hrefOnly) return href;
  
      var name = text ||
        (page && (page.htmlName ||    // htmlName may be generated by plugins
                  esc(page.name) ||
                  esc(page.title) ||
                  esc((!page._hdr && page._file.path.slice(1)) || ''))) ||
        esc(u.unslugify(href)) ||
        '--';
  
      var onclick = (page && page.onclick) ? ' onclick="' + esc(page.onclick) + '"' : '';
  
      // auto-highlight link to current docPage with class="{opts.openClass}"
      var css = (renderOpts.openClass && page && renderOpts.docPage === page) ? ' class = "' + esc(renderOpts.openClass) + '"' : '';
  
      return '<a href="' + (href || '#') + '"' + (title ? ' title="' + title + '"' : '') + css + target + onclick + '>' + name + '</a>';
    }
docs: renderLink function signature matches marked.js link renderer (href, title, text) supports alternative signature using object {href, title, text, hrefOnly} uses page.name or href for link text, if text is missing and does reasonable things for missing name, href NOTE: params passed as strings are assumed pre-html-escaped, params in {} are not.