markdown-to-jsx 9.8.1 → 9.9.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/README.md +89 -6
- package/dist/html.cjs +47 -41
- package/dist/html.d.cts +36 -4
- package/dist/html.d.ts +36 -4
- package/dist/html.js +47 -41
- package/dist/html.js.map +7 -7
- package/dist/index.cjs +45 -42
- package/dist/index.d.cts +36 -4
- package/dist/index.d.ts +36 -4
- package/dist/index.js +45 -42
- package/dist/index.js.map +7 -7
- package/dist/markdown.cjs +72 -59
- package/dist/markdown.d.cts +36 -4
- package/dist/markdown.d.ts +36 -4
- package/dist/markdown.js +72 -59
- package/dist/markdown.js.map +7 -7
- package/dist/native.cjs +44 -41
- package/dist/native.d.cts +48 -4
- package/dist/native.d.ts +48 -4
- package/dist/native.js +44 -41
- package/dist/native.js.map +7 -7
- package/dist/react.cjs +45 -42
- package/dist/react.d.cts +36 -4
- package/dist/react.d.ts +36 -4
- package/dist/react.js +45 -42
- package/dist/react.js.map +7 -7
- package/dist/solid.cjs +44 -41
- package/dist/solid.d.cts +36 -4
- package/dist/solid.d.ts +36 -4
- package/dist/solid.js +44 -41
- package/dist/solid.js.map +7 -7
- package/dist/vue.cjs +44 -41
- package/dist/vue.d.cts +37 -5
- package/dist/vue.d.ts +37 -5
- package/dist/vue.js +44 -41
- package/dist/vue.js.map +7 -7
- package/package.json +3 -2
package/dist/index.d.cts
CHANGED
|
@@ -63,13 +63,15 @@ type RequireAtLeastOne<
|
|
|
63
63
|
inList?: boolean;
|
|
64
64
|
/** true if parsing in an inline context (subset of rules around formatting and links) */
|
|
65
65
|
inline?: boolean;
|
|
66
|
+
/** internal (react-native renderer): the enclosing subtree is already known inline-safe, so a nested inline container can skip re-deriving it */
|
|
67
|
+
inlineSafe?: boolean;
|
|
66
68
|
/** use this for the `key` prop */
|
|
67
69
|
key?: string | number;
|
|
68
|
-
/** reference definitions (footnotes are stored with '^' prefix) */
|
|
70
|
+
/** reference definitions (footnotes are stored with '^' prefix); footnotes carry no title */
|
|
69
71
|
refs?: {
|
|
70
72
|
[key: string]: {
|
|
71
73
|
target: string;
|
|
72
|
-
title: string;
|
|
74
|
+
title: string | undefined;
|
|
73
75
|
};
|
|
74
76
|
};
|
|
75
77
|
/** current recursion depth during rendering */
|
|
@@ -82,8 +84,32 @@ type RequireAtLeastOne<
|
|
|
82
84
|
_htmlDepth?: number;
|
|
83
85
|
/** internal: set by collectReferenceDefinitions when input ends inside an unclosed fence */
|
|
84
86
|
_endsInsideFence?: boolean;
|
|
87
|
+
/** internal: true when the current block content cannot hold the document's streaming edge, so streaming suppression can be skipped */
|
|
88
|
+
_notAtEdge?: boolean;
|
|
89
|
+
/** internal: enable hard/soft line-break processing in parseInline (paragraph inline content) */
|
|
90
|
+
_breaks?: boolean;
|
|
85
91
|
/** internal: smallest bare-URL start position known to fail by reaching end-of-input (issue #874); scoped per parseInline call */
|
|
86
92
|
_inlineUrlFailFrom?: number;
|
|
93
|
+
/** internal: deferred inline parses, drained by the owning parseMarkdown after the block pass so all reference definitions are known */
|
|
94
|
+
_pendingInline?: {
|
|
95
|
+
dest: ASTNode[];
|
|
96
|
+
text: string;
|
|
97
|
+
breaks: boolean;
|
|
98
|
+
inline?: boolean;
|
|
99
|
+
inAnchor?: boolean;
|
|
100
|
+
inHTML?: boolean;
|
|
101
|
+
htmlDepth?: number;
|
|
102
|
+
inList?: boolean;
|
|
103
|
+
inBlockQuote?: boolean;
|
|
104
|
+
noSetext?: boolean;
|
|
105
|
+
depth?: number;
|
|
106
|
+
}[];
|
|
107
|
+
/** internal: deferred list-item unwrap/concat ops, run after _pendingInline drains */
|
|
108
|
+
_pendingOps?: {
|
|
109
|
+
src: ASTNode[];
|
|
110
|
+
dest: ASTNode[];
|
|
111
|
+
unwrap: boolean;
|
|
112
|
+
}[];
|
|
87
113
|
};
|
|
88
114
|
/**
|
|
89
115
|
* Blockquote node in the AST
|
|
@@ -178,6 +204,10 @@ type RequireAtLeastOne<
|
|
|
178
204
|
type: typeof RuleType.htmlComment;
|
|
179
205
|
/** Comment text */
|
|
180
206
|
text: string;
|
|
207
|
+
/** @internal Whether the source comment ended with `>` (empty/special comments) */
|
|
208
|
+
_endsWithGT?: boolean;
|
|
209
|
+
/** @internal Whether the comment should be emitted as raw source text */
|
|
210
|
+
raw?: boolean;
|
|
181
211
|
}
|
|
182
212
|
/**
|
|
183
213
|
* Image node
|
|
@@ -240,11 +270,11 @@ type RequireAtLeastOne<
|
|
|
240
270
|
*/
|
|
241
271
|
export interface ReferenceCollectionNode {
|
|
242
272
|
type: typeof RuleType.refCollection;
|
|
243
|
-
/** Map of reference labels to their definitions */
|
|
273
|
+
/** Map of reference labels to their definitions; footnotes carry no title */
|
|
244
274
|
refs: {
|
|
245
275
|
[key: string]: {
|
|
246
276
|
target: string;
|
|
247
|
-
title: string;
|
|
277
|
+
title: string | undefined;
|
|
248
278
|
};
|
|
249
279
|
};
|
|
250
280
|
}
|
|
@@ -301,6 +331,8 @@ type RequireAtLeastOne<
|
|
|
301
331
|
_rawAttrs?: string;
|
|
302
332
|
/** @internal Original raw HTML content (for verbatim blocks) */
|
|
303
333
|
_rawText?: string | undefined;
|
|
334
|
+
/** @internal rawText is a closed block; the HTML compiler emits the closing tag itself */
|
|
335
|
+
_emitOwnClose?: boolean;
|
|
304
336
|
/** @deprecated Use `_rawText` instead. This property will be removed in a future major version. */
|
|
305
337
|
text?: string | undefined;
|
|
306
338
|
/** HTML tag name */
|
package/dist/index.d.ts
CHANGED
|
@@ -63,13 +63,15 @@ type RequireAtLeastOne<
|
|
|
63
63
|
inList?: boolean;
|
|
64
64
|
/** true if parsing in an inline context (subset of rules around formatting and links) */
|
|
65
65
|
inline?: boolean;
|
|
66
|
+
/** internal (react-native renderer): the enclosing subtree is already known inline-safe, so a nested inline container can skip re-deriving it */
|
|
67
|
+
inlineSafe?: boolean;
|
|
66
68
|
/** use this for the `key` prop */
|
|
67
69
|
key?: string | number;
|
|
68
|
-
/** reference definitions (footnotes are stored with '^' prefix) */
|
|
70
|
+
/** reference definitions (footnotes are stored with '^' prefix); footnotes carry no title */
|
|
69
71
|
refs?: {
|
|
70
72
|
[key: string]: {
|
|
71
73
|
target: string;
|
|
72
|
-
title: string;
|
|
74
|
+
title: string | undefined;
|
|
73
75
|
};
|
|
74
76
|
};
|
|
75
77
|
/** current recursion depth during rendering */
|
|
@@ -82,8 +84,32 @@ type RequireAtLeastOne<
|
|
|
82
84
|
_htmlDepth?: number;
|
|
83
85
|
/** internal: set by collectReferenceDefinitions when input ends inside an unclosed fence */
|
|
84
86
|
_endsInsideFence?: boolean;
|
|
87
|
+
/** internal: true when the current block content cannot hold the document's streaming edge, so streaming suppression can be skipped */
|
|
88
|
+
_notAtEdge?: boolean;
|
|
89
|
+
/** internal: enable hard/soft line-break processing in parseInline (paragraph inline content) */
|
|
90
|
+
_breaks?: boolean;
|
|
85
91
|
/** internal: smallest bare-URL start position known to fail by reaching end-of-input (issue #874); scoped per parseInline call */
|
|
86
92
|
_inlineUrlFailFrom?: number;
|
|
93
|
+
/** internal: deferred inline parses, drained by the owning parseMarkdown after the block pass so all reference definitions are known */
|
|
94
|
+
_pendingInline?: {
|
|
95
|
+
dest: ASTNode[];
|
|
96
|
+
text: string;
|
|
97
|
+
breaks: boolean;
|
|
98
|
+
inline?: boolean;
|
|
99
|
+
inAnchor?: boolean;
|
|
100
|
+
inHTML?: boolean;
|
|
101
|
+
htmlDepth?: number;
|
|
102
|
+
inList?: boolean;
|
|
103
|
+
inBlockQuote?: boolean;
|
|
104
|
+
noSetext?: boolean;
|
|
105
|
+
depth?: number;
|
|
106
|
+
}[];
|
|
107
|
+
/** internal: deferred list-item unwrap/concat ops, run after _pendingInline drains */
|
|
108
|
+
_pendingOps?: {
|
|
109
|
+
src: ASTNode[];
|
|
110
|
+
dest: ASTNode[];
|
|
111
|
+
unwrap: boolean;
|
|
112
|
+
}[];
|
|
87
113
|
};
|
|
88
114
|
/**
|
|
89
115
|
* Blockquote node in the AST
|
|
@@ -178,6 +204,10 @@ type RequireAtLeastOne<
|
|
|
178
204
|
type: typeof RuleType.htmlComment;
|
|
179
205
|
/** Comment text */
|
|
180
206
|
text: string;
|
|
207
|
+
/** @internal Whether the source comment ended with `>` (empty/special comments) */
|
|
208
|
+
_endsWithGT?: boolean;
|
|
209
|
+
/** @internal Whether the comment should be emitted as raw source text */
|
|
210
|
+
raw?: boolean;
|
|
181
211
|
}
|
|
182
212
|
/**
|
|
183
213
|
* Image node
|
|
@@ -240,11 +270,11 @@ type RequireAtLeastOne<
|
|
|
240
270
|
*/
|
|
241
271
|
export interface ReferenceCollectionNode {
|
|
242
272
|
type: typeof RuleType.refCollection;
|
|
243
|
-
/** Map of reference labels to their definitions */
|
|
273
|
+
/** Map of reference labels to their definitions; footnotes carry no title */
|
|
244
274
|
refs: {
|
|
245
275
|
[key: string]: {
|
|
246
276
|
target: string;
|
|
247
|
-
title: string;
|
|
277
|
+
title: string | undefined;
|
|
248
278
|
};
|
|
249
279
|
};
|
|
250
280
|
}
|
|
@@ -301,6 +331,8 @@ type RequireAtLeastOne<
|
|
|
301
331
|
_rawAttrs?: string;
|
|
302
332
|
/** @internal Original raw HTML content (for verbatim blocks) */
|
|
303
333
|
_rawText?: string | undefined;
|
|
334
|
+
/** @internal rawText is a closed block; the HTML compiler emits the closing tag itself */
|
|
335
|
+
_emitOwnClose?: boolean;
|
|
304
336
|
/** @deprecated Use `_rawText` instead. This property will be removed in a future major version. */
|
|
305
337
|
text?: string | undefined;
|
|
306
338
|
/** HTML tag name */
|