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