code: function linkToWithTarget(doc, linkText) {
    var linkTag = linkto(doc.longname, linkText || doc.name);
    return linkTag.slice(0, linkTag.indexOf('>')) + ' data-target="#' +
      escapeDocId(doc.id) + '"' + linkTag.slice(linkTag.indexOf('>'));
  }
docs: Returns a link just like linkto, but with an id to its target header on the page added so bootstrap scrollspy can pick it up use it to work. Also sanitizes the input because jsdoc uses all sorts of weird characters in their ids. Optionally, link text can be passed in to use instead of the doc's name inside the link.