@readme/markdown 13.3.0 → 13.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.
@@ -21,6 +21,18 @@ export type JSXContext = Record<string, unknown>;
21
21
  * ```
22
22
  */
23
23
  export declare function evaluateExpression(expression: string, context: JSXContext): any;
24
+ /**
25
+ * Removes JSX-style comments (e.g., { /* comment *\/ }) from content.
26
+ *
27
+ * @param content
28
+ * @returns Content with JSX comments removed
29
+ * @example
30
+ * ```typescript
31
+ * removeJSXComments('Text { /* comment *\/ } more text')
32
+ * // Returns: 'Text more text'
33
+ * ```
34
+ */
35
+ export declare function removeJSXComments(content: string): string;
24
36
  /**
25
37
  * Preprocesses JSX-like expressions in markdown before parsing.
26
38
  * Inline expressions are handled separately; attribute expressions are processed here.
@@ -1,7 +1,11 @@
1
1
  import type { Plugin } from 'unified';
2
2
  /**
3
- * A remark plugin that parses {user.<field>} patterns from text nodes
4
- * without requiring remarkMdx. Creates Variable nodes for runtime resolution.
3
+ * A remark plugin that parses {user.<field>} patterns from text nodes and
4
+ * mdxTextExpression nodes, creating Variable nodes for runtime resolution.
5
+ *
6
+ * Handles both:
7
+ * - `text` nodes: when safeMode is true or after expression evaluation
8
+ * - `mdxTextExpression` nodes: when mdxExpression has parsed {user.*} before evaluation
5
9
  *
6
10
  * Supports any user field: name, email, email_verified, exp, iat, etc.
7
11
  */
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": "13.3.0",
5
+ "version": "13.4.0",
6
6
  "main": "dist/main.node.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "browser": "dist/main.js",