export function extractContent()

in src/pages/api-changes/utils.ts [29:39]


export function extractContent(body: string) {
  const match = DEVDOC_REGEX.exec(body);
  if (!match) {
    return null;
  }

  const [, headerLevel, text] = match;

  // Remove all text from the next header at the same or a higher level than the Dev-Docs header was
  return text.replace(new RegExp(`^#{1,${headerLevel.length}} [\\s\\S]*`, 'img'), '').trim();
}