@readme/markdown 14.1.1 → 14.1.3

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.
@@ -2,12 +2,14 @@ import type { Html, PhrasingContent } from 'mdast';
2
2
  import type { MdxJsxAttribute, MdxJsxExpressionAttribute, MdxJsxTextElement } from 'mdast-util-mdx-jsx';
3
3
  export type MdxAttributes = (MdxJsxAttribute | MdxJsxExpressionAttribute)[];
4
4
  /**
5
- * Shared unified processor for re-parsing the body of an MDX-ish component.
6
- * Used by both the block and inline-block transformers so a nested component
7
- * (e.g. `<Anchor>text with <b>bold</b></Anchor>`) goes through the same
8
- * tokenizer chain as the top-level parse.
5
+ * Unified processor for re-parsing the body of an MDX component
6
+ * Memoized based on the argument value so we don't pay the construction cost on every parse
7
+ * Currently the argument is only safeMode, but we could add more arguments in the future,
8
+ * in which case the key would need to be extend to include the new arguments.
9
9
  */
10
- export declare const inlineMdProcessor: import("unified").Processor<import("mdast").Root, undefined, undefined, undefined, undefined>;
10
+ export declare const getInlineMdProcessor: ({ safeMode }?: {
11
+ safeMode?: boolean;
12
+ }) => import("unified").Processor<import("mdast").Root, undefined, undefined, undefined, undefined>;
11
13
  /**
12
14
  * True when a tag name starts with an uppercase letter — ReadMe's marker for
13
15
  * a custom MDX component (vs a lowercase HTML tag).
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@readme/markdown",
3
3
  "description": "ReadMe's React-based Markdown parser",
4
4
  "author": "Rafe Goldberg <rafe@readme.io>",
5
- "version": "14.1.1",
5
+ "version": "14.1.3",
6
6
  "main": "dist/main.node.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "browser": "dist/main.js",