markdown-to-jsx 9.2.0 → 9.3.1

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.
package/dist/native.d.cts CHANGED
@@ -56,7 +56,7 @@ type RequireAtLeastOne<
56
56
  /** true if parsing in an inline context (subset of rules around formatting and links) */
57
57
  inline?: boolean;
58
58
  /** use this for the `key` prop */
59
- key?: React.Key;
59
+ key?: string | number;
60
60
  /** reference definitions (footnotes are stored with '^' prefix) */
61
61
  refs?: {
62
62
  [key: string]: {
@@ -185,6 +185,7 @@ type RequireAtLeastOne<
185
185
  attrs?: Record<string, any>;
186
186
  isClosingTag?: boolean;
187
187
  tag: string;
188
+ rawText?: string;
188
189
  }
189
190
  export type ASTNode = BlockQuoteNode | BreakLineNode | BreakThematicNode | CodeBlockNode | CodeInlineNode | FootnoteNode | FootnoteReferenceNode | FrontmatterNode | GFMTaskNode | HeadingNode | HTMLCommentNode | ImageNode | LinkNode | OrderedListNode | UnorderedListNode | ParagraphNode | ReferenceNode | ReferenceCollectionNode | TableNode | TextNode | FormattedTextNode | HTMLNode | HTMLSelfClosingNode;
190
191
  export type ASTRender = (ast: MarkdownToJSX.ASTNode | MarkdownToJSX.ASTNode[], state: MarkdownToJSX.State) => React.ReactNode;
@@ -272,7 +273,7 @@ type RequireAtLeastOne<
272
273
  * Override the built-in sanitizer function for URLs, etc if desired. The built-in version is available as a library
273
274
  export called `sanitizer`.
274
275
  */
275
- sanitizer: (value: string, tag: HTMLTags, attribute: string) => string | null;
276
+ sanitizer: (value: string, tag: string, attribute: string) => string | null;
276
277
  /**
277
278
  * Override normalization of non-URI-safe characters for use in generating
278
279
  * HTML IDs for anchor linking purposes.
package/dist/native.d.ts CHANGED
@@ -56,7 +56,7 @@ type RequireAtLeastOne<
56
56
  /** true if parsing in an inline context (subset of rules around formatting and links) */
57
57
  inline?: boolean;
58
58
  /** use this for the `key` prop */
59
- key?: React.Key;
59
+ key?: string | number;
60
60
  /** reference definitions (footnotes are stored with '^' prefix) */
61
61
  refs?: {
62
62
  [key: string]: {
@@ -185,6 +185,7 @@ type RequireAtLeastOne<
185
185
  attrs?: Record<string, any>;
186
186
  isClosingTag?: boolean;
187
187
  tag: string;
188
+ rawText?: string;
188
189
  }
189
190
  export type ASTNode = BlockQuoteNode | BreakLineNode | BreakThematicNode | CodeBlockNode | CodeInlineNode | FootnoteNode | FootnoteReferenceNode | FrontmatterNode | GFMTaskNode | HeadingNode | HTMLCommentNode | ImageNode | LinkNode | OrderedListNode | UnorderedListNode | ParagraphNode | ReferenceNode | ReferenceCollectionNode | TableNode | TextNode | FormattedTextNode | HTMLNode | HTMLSelfClosingNode;
190
191
  export type ASTRender = (ast: MarkdownToJSX.ASTNode | MarkdownToJSX.ASTNode[], state: MarkdownToJSX.State) => React.ReactNode;
@@ -272,7 +273,7 @@ type RequireAtLeastOne<
272
273
  * Override the built-in sanitizer function for URLs, etc if desired. The built-in version is available as a library
273
274
  export called `sanitizer`.
274
275
  */
275
- sanitizer: (value: string, tag: HTMLTags, attribute: string) => string | null;
276
+ sanitizer: (value: string, tag: string, attribute: string) => string | null;
276
277
  /**
277
278
  * Override normalization of non-URI-safe characters for use in generating
278
279
  * HTML IDs for anchor linking purposes.