src/Page.js
function generateHeadingSelector(headingIndexingLevel) {
  let headingsSelectors = ['.always-index:header', 'h1'];
  for (let i = 2; i <= headingIndexingLevel; i += 1) {
    headingsSelectors.push(`h${i}`);
  }
  headingsSelectors = headingsSelectors.map(selector => `${selector}:not(.no-index)`);
  return headingsSelectors.join(',');
}
function generateHeadingSelector(headingIndexingLevel) {
  let headingsSelectors = ['.always-index:header', 'h1'];
  for (let i = 2; i <= headingIndexingLevel; i += 1) {
    headingsSelectors.push(`h${i}`);
  }
  headingsSelectors = headingsSelectors.map(selector => `${selector}:not(.no-index)`);
  return headingsSelectors.join(',');
}
function generateHeadingSelector ( headingIndexingLevel ) { let headingsSelectors = [ '.always-index:header' , 'h1' ] ; for ( let i = 2 ; i <= headingIndexingLevel ; i += 1 ) { headingsSelectors . push ( ` ${ i } ` ) ; } headingsSelectors = headingsSelectors . map ( selector => ` ${ selector } ` ) ; return headingsSelectors . join ( ',' ) ; }
Generates a selector for headings with level inside the headingIndexLevel
or with the index attribute, that do not also have the noindex attribute
@param headingIndexingLevel to generate
Generates a selector for headings with level inside the headingIndexLevel or with the index attribute that do not also have the noindex attribute