@mintlify/prebuild 1.0.947 → 1.0.949

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- import { coreRemark, getAST } from '@mintlify/common';
1
+ import { coreRemark, getAST, preprocessCustomHeadingIds } from '@mintlify/common';
2
2
  import { formatError } from '../../errorMessages/formatError.js';
3
3
  export { formatError };
4
4
  export const preparseMdx = async (fileContent, contentDirectoryPath, filePath, onError) => {
5
5
  try {
6
- return String(await coreRemark().process(fileContent));
6
+ return String(await coreRemark().process(preprocessCustomHeadingIds(fileContent)));
7
7
  }
8
8
  catch (error) {
9
9
  const message = formatError(error, filePath, contentDirectoryPath);
@@ -27,10 +27,6 @@ export const readPageContents = async ({ contentDirectoryPath, openApiFiles, asy
27
27
  return;
28
28
  }
29
29
  const { slug, pageMetadata } = getDecoratedNavPageAndSlug(filename, contentStr, openApiFiles, asyncApiFiles);
30
- const existingPage = pagesAcc[slug];
31
- if (existingPage?.openapi && pageMetadata.openapi) {
32
- pageMetadata.openapi = existingPage.openapi;
33
- }
34
30
  pagesAcc[slug] = pageMetadata;
35
31
  return { targetPath, sourcePath, tree, metadata: pageMetadata };
36
32
  }
@@ -57,10 +57,6 @@ const resolveImportsInPages = async ({ openApiFiles, asyncApiFiles, snippetsWith
57
57
  });
58
58
  const contentStr = stringifyTree(tree);
59
59
  const { slug, pageMetadata } = getDecoratedNavPageAndSlug(fileWithImports.filename, contentStr, openApiFiles, asyncApiFiles);
60
- const existingPage = pagesAcc[slug];
61
- if (existingPage?.openapi && pageMetadata.openapi) {
62
- pageMetadata.openapi = existingPage.openapi;
63
- }
64
60
  pagesAcc[slug] = pageMetadata;
65
61
  const targetPath = join('src', '_props', fileWithImports.filename);
66
62
  return {