@mintlify/common 1.0.1305 → 1.0.1306

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,3 +1,3 @@
1
- export { parseFrontmatter, hasFrontmatter } from './parseFrontmatter.js';
1
+ export { FRONTMATTER_RE, parseFrontmatter, hasFrontmatter } from './parseFrontmatter.js';
2
2
  export type { FrontmatterAttributes } from './parseFrontmatter.js';
3
3
  export type { FrontMatterResult } from 'front-matter';
@@ -1 +1 @@
1
- export { parseFrontmatter, hasFrontmatter } from './parseFrontmatter.js';
1
+ export { FRONTMATTER_RE, parseFrontmatter, hasFrontmatter } from './parseFrontmatter.js';
@@ -1,4 +1,5 @@
1
1
  import type { FrontMatterResult } from 'front-matter';
2
+ export declare const FRONTMATTER_RE: RegExp;
2
3
  /**
3
4
  * Default type for frontmatter attributes when no specific type is provided.
4
5
  * Represents a flexible object that can contain any valid JSON-like values.
@@ -1,6 +1,7 @@
1
1
  import fm from 'front-matter';
2
2
  // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
3
3
  const frontmatter = fm;
4
+ export const FRONTMATTER_RE = /^?(---|\+\+\+)\r?\n[\s\S]*?\r?\n\1[ \t]*(?=\r?\n|$)/;
4
5
  /**
5
6
  * Type-safe wrapper for parsing front-matter from markdown content.
6
7
  *
@@ -1,5 +1,6 @@
1
1
  import type { RootContent } from 'mdast';
2
2
  import { MdxJsxFlowElement } from 'mdast-util-mdx-jsx';
3
+ export declare const HEADING_ID_RE: RegExp;
3
4
  export interface PreprocessCustomHeadingIdsOptions {
4
5
  /**
5
6
  * When true, preserves the original ID as-is (only removing characters unsafe
@@ -1,4 +1,4 @@
1
- const HEADING_ID_RE = /^( {0,3})(#{1,6})\s+(.+?)\s*\{\s*#([^}]+?)\s*\}\s*$/;
1
+ export const HEADING_ID_RE = /^( {0,3})(#{1,6})\s+(.+?)\s*\{\s*#([^}]+?)\s*\}\s*$/;
2
2
  /**
3
3
  * Inside an `<MDX>` block the body is dedented before it is parsed, so indentation carries no
4
4
  * meaning there (4+ spaces is not an indented code block) and any indent may precede the heading.