function validateHeaderId()

in beta/scripts/headingIDHelpers/validateHeadingIDs.js [12:25]


function validateHeaderId(line) {
  if (!line.startsWith('#')) {
    return;
  }

  const match = /\{\/\*(.*?)\*\/}/.exec(line);
  const id = match;
  if (!id) {
    console.error(
      'Run yarn fix-headings to generate headings.'
    );
    process.exit(1);
  }
}