website/docgen/processors/add-links.js
function(doc) {
  // Heuristic for the custom docs in the lib/selenium-webdriver/ folder.
  if (doc.name && doc.name.startsWith('webdriver')) {
    return;
  }
  var template = _.template('https://github.com/angular/protractor/blob/' +
      '<%= linksHash %>/lib/<%= fileName %>.ts');

  doc.sourceLink = template({
    linksHash: linksHash,
    fileName: doc.fileName
  });
}
function(doc) {
  // Heuristic for the custom docs in the lib/selenium-webdriver/ folder.
  if (doc.name && doc.name.startsWith('webdriver')) {
    return;
  }
  var template = _.template('https://github.com/angular/protractor/blob/' +
      '<%= linksHash %>/lib/<%= fileName %>.ts');

  doc.sourceLink = template({
    linksHash: linksHash,
    fileName: doc.fileName
  });
}
function ( doc ) { // Heuristic for the custom docs in the lib/selenium-webdriver/ folder. if ( doc . name && doc . name . startsWith ( 'webdriver' ) ) { return ; } var template = _ . template ( 'https://github.com/angular/protractor/blob/' + '<%= linksHash %>/lib/<%= fileName %>.ts' ) ; doc . sourceLink = template ( { linksHash : linksHash , fileName : doc . fileName } ) ; }
Add a link to the source code.
@param {!Object} doc Current document.
Add a link to the source code .