markdown-to-jsx 9.3.4 → 9.4.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/html.d.cts CHANGED
@@ -175,6 +175,7 @@ type RequireAtLeastOne<
175
175
  attrs?: Record<string, any>;
176
176
  children?: ASTNode[] | undefined;
177
177
  noInnerParse?: Boolean;
178
+ rawAttrs?: string;
178
179
  tag: string;
179
180
  text?: string | undefined;
180
181
  }
@@ -226,6 +227,31 @@ type RequireAtLeastOne<
226
227
  */
227
228
  enforceAtxHeadings: boolean;
228
229
  /**
230
+ * **⚠️ SECURITY WARNING: STRONGLY DISCOURAGED FOR USER INPUTS**
231
+ *
232
+ * When enabled, attempts to eval expressions in JSX props that cannot be serialized
233
+ * as JSON (functions, variables, complex expressions). This uses `eval()` which can
234
+ * execute arbitrary code.
235
+ *
236
+ * **ONLY use this option when:**
237
+ * - The markdown source is completely trusted (e.g., your own documentation)
238
+ * - You control all JSX components and their props
239
+ * - The content is NOT user-generated or user-editable
240
+ *
241
+ * **DO NOT use this option when:**
242
+ * - Processing user-submitted markdown
243
+ * - Rendering untrusted content
244
+ * - Building public-facing applications with user content
245
+ *
246
+ * Example unsafe input: `<Component onClick={() => fetch('/admin/delete-all')} />`
247
+ *
248
+ * When disabled (default), unserializable expressions remain as strings that can be
249
+ * safely inspected or handled on a case-by-case basis via custom renderRule logic.
250
+ *
251
+ * @default false
252
+ */
253
+ evalUnserializableExpressions?: boolean;
254
+ /**
229
255
  * Forces the compiler to always output content with a block-level wrapper
230
256
  * (`<p>` or any block-level syntax your markdown already contains.)
231
257
  */
package/dist/html.d.ts CHANGED
@@ -175,6 +175,7 @@ type RequireAtLeastOne<
175
175
  attrs?: Record<string, any>;
176
176
  children?: ASTNode[] | undefined;
177
177
  noInnerParse?: Boolean;
178
+ rawAttrs?: string;
178
179
  tag: string;
179
180
  text?: string | undefined;
180
181
  }
@@ -226,6 +227,31 @@ type RequireAtLeastOne<
226
227
  */
227
228
  enforceAtxHeadings: boolean;
228
229
  /**
230
+ * **⚠️ SECURITY WARNING: STRONGLY DISCOURAGED FOR USER INPUTS**
231
+ *
232
+ * When enabled, attempts to eval expressions in JSX props that cannot be serialized
233
+ * as JSON (functions, variables, complex expressions). This uses `eval()` which can
234
+ * execute arbitrary code.
235
+ *
236
+ * **ONLY use this option when:**
237
+ * - The markdown source is completely trusted (e.g., your own documentation)
238
+ * - You control all JSX components and their props
239
+ * - The content is NOT user-generated or user-editable
240
+ *
241
+ * **DO NOT use this option when:**
242
+ * - Processing user-submitted markdown
243
+ * - Rendering untrusted content
244
+ * - Building public-facing applications with user content
245
+ *
246
+ * Example unsafe input: `<Component onClick={() => fetch('/admin/delete-all')} />`
247
+ *
248
+ * When disabled (default), unserializable expressions remain as strings that can be
249
+ * safely inspected or handled on a case-by-case basis via custom renderRule logic.
250
+ *
251
+ * @default false
252
+ */
253
+ evalUnserializableExpressions?: boolean;
254
+ /**
229
255
  * Forces the compiler to always output content with a block-level wrapper
230
256
  * (`<p>` or any block-level syntax your markdown already contains.)
231
257
  */