markdown-to-jsx 9.2.0 → 9.3.0

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