scripts/doc-generator/generate_header_html.js
/**
 * Returns the HTML string corresponding to the current version number, if
 * available, and with the corresponding link, also if available.
 * @param {Object} versionInfo
 * @param {string} customClass
 * @returns {string}
 */
Returns the HTML string corresponding to the current version number, if
available, and with the corresponding link, also if available.
@param {Object} versionInfo
@param {string} customClass
@returns {string}
Returns the HTML string corresponding to the current version number if available and with the corresponding link also if available . @param { Object } versionInfo @param { string } customClass @returns { string }
function constructVersionLinkHtmlInHeaderBar(versionInfo, customClass) {
  if (
    versionInfo === undefined || versionInfo === null ||
    typeof versionInfo.version !== "string"
  ) {
    return "";
  }
  let element = "";
  let hasLink = false;
  const { version } = versionInfo;
  if (typeof versionInfo.link === "string") {
    hasLink = true;
    element += `<a class="navbar-item${customClass}"` +
      `href="${encode(versionInfo.link)}">`;
  } else {
    element += `<span class="navbar-item${customClass}">`;
  }
  element += `<span class="version-item">version: ${encode(version)}</span>`;
  element += hasLink ? "</a>" : "</span>";
  return element;
}
function constructVersionLinkHtmlInHeaderBar ( versionInfo , customClass ) { if ( versionInfo === undefined || versionInfo === null || typeof versionInfo . version !== "string" ) { return "" ; } let element = "" ; let hasLink = false ; const { version } = versionInfo ; if ( typeof versionInfo . link === "string" ) { hasLink = true ; element += ` ${ customClass } ` + ` ${ encode ( versionInfo . link ) } ` ; } else { element += ` ${ customClass } ` ; } element += ` ${ encode ( version ) } ` ; element += hasLink ? "</a>" : "</span>" ; return element ; }
Returns the HTML string corresponding to the current version number, if
 available, and with the corresponding link, also if available.
Returns the HTML string corresponding to the current version number if available and with the corresponding link also if available .