markdown-codec 11.0.1 → 11.0.2
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 +1 -1
- package/dist/codec.d.cts +8 -8
- package/dist/codec.d.ts +8 -8
- package/dist/emit/emit.cjs +3 -3
- package/dist/emit/emit.js +3 -3
- package/dist/emit/table.cjs +1 -1
- package/dist/emit/table.js +1 -1
- package/dist/lower/lower.cjs +4 -4
- package/dist/lower/lower.js +4 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -169,7 +169,7 @@ pnpm test:workers # turbo run _test:workers (unit suite under the real Cloudfla
|
|
|
169
169
|
pnpm test:watch # vitest --project unit
|
|
170
170
|
pnpm test:coverage # turbo run _test:coverage (vitest run --project unit --coverage)
|
|
171
171
|
pnpm test:smoke # turbo run _test:smoke (rebuilds dist/, verifies ESM/CJS parity + a real round trip per bundle)
|
|
172
|
-
pnpm test:corpus # turbo run _test:corpus (optional, gitignored real-world sanity check
|
|
172
|
+
pnpm test:corpus # turbo run _test:corpus (optional, gitignored real-world sanity check — see Fidelity)
|
|
173
173
|
```
|
|
174
174
|
|
|
175
175
|
To run a single test file: `pnpm vitest run src/path/to/file.test.ts`.
|
package/dist/codec.d.cts
CHANGED
|
@@ -17,8 +17,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
17
17
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
18
18
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
19
19
|
left: "left";
|
|
20
|
-
center: "center";
|
|
21
20
|
right: "right";
|
|
21
|
+
center: "center";
|
|
22
22
|
justify: "justify";
|
|
23
23
|
}>>;
|
|
24
24
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -172,8 +172,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
172
172
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
173
173
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
174
174
|
left: "left";
|
|
175
|
-
center: "center";
|
|
176
175
|
right: "right";
|
|
176
|
+
center: "center";
|
|
177
177
|
justify: "justify";
|
|
178
178
|
}>>;
|
|
179
179
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -332,8 +332,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
332
332
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
333
333
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
334
334
|
left: "left";
|
|
335
|
-
center: "center";
|
|
336
335
|
right: "right";
|
|
336
|
+
center: "center";
|
|
337
337
|
justify: "justify";
|
|
338
338
|
}>>;
|
|
339
339
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -487,8 +487,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
487
487
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
488
488
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
489
489
|
left: "left";
|
|
490
|
-
center: "center";
|
|
491
490
|
right: "right";
|
|
491
|
+
center: "center";
|
|
492
492
|
justify: "justify";
|
|
493
493
|
}>>;
|
|
494
494
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -701,8 +701,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
701
701
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
702
702
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
703
703
|
left: "left";
|
|
704
|
-
center: "center";
|
|
705
704
|
right: "right";
|
|
705
|
+
center: "center";
|
|
706
706
|
justify: "justify";
|
|
707
707
|
}>>;
|
|
708
708
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -1538,8 +1538,8 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1538
1538
|
}, z.core.$strip>>;
|
|
1539
1539
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
1540
1540
|
left: "left";
|
|
1541
|
-
center: "center";
|
|
1542
1541
|
right: "right";
|
|
1542
|
+
center: "center";
|
|
1543
1543
|
justify: "justify";
|
|
1544
1544
|
}>>;
|
|
1545
1545
|
verticalAlignment: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1681,10 +1681,10 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1681
1681
|
}>;
|
|
1682
1682
|
align: z.ZodEnum<{
|
|
1683
1683
|
left: "left";
|
|
1684
|
-
center: "center";
|
|
1685
1684
|
right: "right";
|
|
1686
1685
|
top: "top";
|
|
1687
1686
|
bottom: "bottom";
|
|
1687
|
+
center: "center";
|
|
1688
1688
|
inside: "inside";
|
|
1689
1689
|
outside: "outside";
|
|
1690
1690
|
}>;
|
|
@@ -1724,10 +1724,10 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1724
1724
|
}>;
|
|
1725
1725
|
align: z.ZodEnum<{
|
|
1726
1726
|
left: "left";
|
|
1727
|
-
center: "center";
|
|
1728
1727
|
right: "right";
|
|
1729
1728
|
top: "top";
|
|
1730
1729
|
bottom: "bottom";
|
|
1730
|
+
center: "center";
|
|
1731
1731
|
inside: "inside";
|
|
1732
1732
|
outside: "outside";
|
|
1733
1733
|
}>;
|
package/dist/codec.d.ts
CHANGED
|
@@ -17,8 +17,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
17
17
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
18
18
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
19
19
|
left: "left";
|
|
20
|
-
center: "center";
|
|
21
20
|
right: "right";
|
|
21
|
+
center: "center";
|
|
22
22
|
justify: "justify";
|
|
23
23
|
}>>;
|
|
24
24
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -172,8 +172,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
172
172
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
173
173
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
174
174
|
left: "left";
|
|
175
|
-
center: "center";
|
|
176
175
|
right: "right";
|
|
176
|
+
center: "center";
|
|
177
177
|
justify: "justify";
|
|
178
178
|
}>>;
|
|
179
179
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -332,8 +332,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
332
332
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
333
333
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
334
334
|
left: "left";
|
|
335
|
-
center: "center";
|
|
336
335
|
right: "right";
|
|
336
|
+
center: "center";
|
|
337
337
|
justify: "justify";
|
|
338
338
|
}>>;
|
|
339
339
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -487,8 +487,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
487
487
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
488
488
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
489
489
|
left: "left";
|
|
490
|
-
center: "center";
|
|
491
490
|
right: "right";
|
|
491
|
+
center: "center";
|
|
492
492
|
justify: "justify";
|
|
493
493
|
}>>;
|
|
494
494
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -701,8 +701,8 @@ declare const markdownCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uin
|
|
|
701
701
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
702
702
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
703
703
|
left: "left";
|
|
704
|
-
center: "center";
|
|
705
704
|
right: "right";
|
|
705
|
+
center: "center";
|
|
706
706
|
justify: "justify";
|
|
707
707
|
}>>;
|
|
708
708
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -1538,8 +1538,8 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1538
1538
|
}, z.core.$strip>>;
|
|
1539
1539
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
1540
1540
|
left: "left";
|
|
1541
|
-
center: "center";
|
|
1542
1541
|
right: "right";
|
|
1542
|
+
center: "center";
|
|
1543
1543
|
justify: "justify";
|
|
1544
1544
|
}>>;
|
|
1545
1545
|
verticalAlignment: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1681,10 +1681,10 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1681
1681
|
}>;
|
|
1682
1682
|
align: z.ZodEnum<{
|
|
1683
1683
|
left: "left";
|
|
1684
|
-
center: "center";
|
|
1685
1684
|
right: "right";
|
|
1686
1685
|
top: "top";
|
|
1687
1686
|
bottom: "bottom";
|
|
1687
|
+
center: "center";
|
|
1688
1688
|
inside: "inside";
|
|
1689
1689
|
outside: "outside";
|
|
1690
1690
|
}>;
|
|
@@ -1724,10 +1724,10 @@ declare const markdownContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffe
|
|
|
1724
1724
|
}>;
|
|
1725
1725
|
align: z.ZodEnum<{
|
|
1726
1726
|
left: "left";
|
|
1727
|
-
center: "center";
|
|
1728
1727
|
right: "right";
|
|
1729
1728
|
top: "top";
|
|
1730
1729
|
bottom: "bottom";
|
|
1730
|
+
center: "center";
|
|
1731
1731
|
inside: "inside";
|
|
1732
1732
|
outside: "outside";
|
|
1733
1733
|
}>;
|
package/dist/emit/emit.cjs
CHANGED
|
@@ -113,8 +113,8 @@ function embedsUnsafeBreakForSetext(text) {
|
|
|
113
113
|
return unsafeSetextBreakReason(text) !== void 0;
|
|
114
114
|
}
|
|
115
115
|
function unsafeSetextDiagnosticMessage(level, reason, embedsLineBreak) {
|
|
116
|
-
const hazard = reason === "leading-indentation" ? `the line that would become the setext heading's own first line of text opens with 4 or more columns of space/tab indentation
|
|
117
|
-
return embedsLineBreak ? `a level ${String(level)} heading's own content contains a line break, but ${hazard}; ATX collapses the break to a single space instead of promoting into a corrupt reparse` : `the effective WriteMarkdownOptions.headingStyle is 'setext' (an explicit caller choice
|
|
116
|
+
const hazard = reason === "leading-indentation" ? `the line that would become the setext heading's own first line of text opens with 4 or more columns of space/tab indentation — setext's own grammar (spec 0.31.2) requires the first line to have "not more than 3 spaces of indentation", so promoting would read that line back as an indented code block instead of heading text` : reason === "interrupting-line" ? `a line of the heading's own text — including possibly its first — would itself be interpretable as a code fence, ATX heading, block quote, thematic break, list item, HTML block, math block, or GFM table delimiter row — setext's own grammar (spec 0.31.2) requires every one of the heading's lines to instead read as ordinary paragraph text, so promoting would read that line back as the start of a fresh, unrelated block (or, for a table delimiter row, a conversion of the line before it) rather than more of the heading` : `promoting would leave the setext underline with no heading text of its own to attach to — either a blank line immediately before it (a trailing break), a blank line in the middle of the heading's own text (a genuinely interior break), or the heading's own rendered text being entirely blank to begin with — setext's own grammar requires "one or more lines of text, not interrupted by a blank line"`;
|
|
117
|
+
return embedsLineBreak ? `a level ${String(level)} heading's own content contains a line break, but ${hazard}; ATX collapses the break to a single space instead of promoting into a corrupt reparse` : `the effective WriteMarkdownOptions.headingStyle is 'setext' (an explicit caller choice — a break-free heading only reaches this path when requested outright), but ${hazard}; rendered as ATX instead of promoting into a corrupt reparse`;
|
|
118
118
|
}
|
|
119
119
|
function willRenderAsSetext(paragraph, level, context) {
|
|
120
120
|
if (level > MAX_SETEXT_LEVEL) return false;
|
|
@@ -169,7 +169,7 @@ function renderParagraphBody(paragraph, context) {
|
|
|
169
169
|
context.sink({
|
|
170
170
|
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.HEADING_STYLE_OVERRIDDEN_FOR_LINE_BREAK,
|
|
171
171
|
severity: "info",
|
|
172
|
-
message: leadingBreakAbsorbed ? `the effective WriteMarkdownOptions.headingStyle is 'atx' (its own default, or an explicit caller choice), but this level ${String(level)} heading's own content contains a line break ATX has no way to hold
|
|
172
|
+
message: leadingBreakAbsorbed ? `the effective WriteMarkdownOptions.headingStyle is 'atx' (its own default, or an explicit caller choice), but this level ${String(level)} heading's own content contains a line break ATX has no way to hold — rendered as setext instead, though the heading's own leading blank line is absorbed as ordinary space ahead of it on read-back rather than reproduced inside it` : `the effective WriteMarkdownOptions.headingStyle is 'atx' (its own default, or an explicit caller choice), but this level ${String(level)} heading's own content contains a line break ATX has no way to hold — rendered as setext instead so the break survives`
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
175
|
return renderSetextHeading(level, text);
|
package/dist/emit/emit.js
CHANGED
|
@@ -112,8 +112,8 @@ function embedsUnsafeBreakForSetext(text) {
|
|
|
112
112
|
return unsafeSetextBreakReason(text) !== void 0;
|
|
113
113
|
}
|
|
114
114
|
function unsafeSetextDiagnosticMessage(level, reason, embedsLineBreak) {
|
|
115
|
-
const hazard = reason === "leading-indentation" ? `the line that would become the setext heading's own first line of text opens with 4 or more columns of space/tab indentation
|
|
116
|
-
return embedsLineBreak ? `a level ${String(level)} heading's own content contains a line break, but ${hazard}; ATX collapses the break to a single space instead of promoting into a corrupt reparse` : `the effective WriteMarkdownOptions.headingStyle is 'setext' (an explicit caller choice
|
|
115
|
+
const hazard = reason === "leading-indentation" ? `the line that would become the setext heading's own first line of text opens with 4 or more columns of space/tab indentation — setext's own grammar (spec 0.31.2) requires the first line to have "not more than 3 spaces of indentation", so promoting would read that line back as an indented code block instead of heading text` : reason === "interrupting-line" ? `a line of the heading's own text — including possibly its first — would itself be interpretable as a code fence, ATX heading, block quote, thematic break, list item, HTML block, math block, or GFM table delimiter row — setext's own grammar (spec 0.31.2) requires every one of the heading's lines to instead read as ordinary paragraph text, so promoting would read that line back as the start of a fresh, unrelated block (or, for a table delimiter row, a conversion of the line before it) rather than more of the heading` : `promoting would leave the setext underline with no heading text of its own to attach to — either a blank line immediately before it (a trailing break), a blank line in the middle of the heading's own text (a genuinely interior break), or the heading's own rendered text being entirely blank to begin with — setext's own grammar requires "one or more lines of text, not interrupted by a blank line"`;
|
|
116
|
+
return embedsLineBreak ? `a level ${String(level)} heading's own content contains a line break, but ${hazard}; ATX collapses the break to a single space instead of promoting into a corrupt reparse` : `the effective WriteMarkdownOptions.headingStyle is 'setext' (an explicit caller choice — a break-free heading only reaches this path when requested outright), but ${hazard}; rendered as ATX instead of promoting into a corrupt reparse`;
|
|
117
117
|
}
|
|
118
118
|
function willRenderAsSetext(paragraph, level, context) {
|
|
119
119
|
if (level > MAX_SETEXT_LEVEL) return false;
|
|
@@ -168,7 +168,7 @@ function renderParagraphBody(paragraph, context) {
|
|
|
168
168
|
context.sink({
|
|
169
169
|
code: MarkdownDiagnosticCodes.HEADING_STYLE_OVERRIDDEN_FOR_LINE_BREAK,
|
|
170
170
|
severity: "info",
|
|
171
|
-
message: leadingBreakAbsorbed ? `the effective WriteMarkdownOptions.headingStyle is 'atx' (its own default, or an explicit caller choice), but this level ${String(level)} heading's own content contains a line break ATX has no way to hold
|
|
171
|
+
message: leadingBreakAbsorbed ? `the effective WriteMarkdownOptions.headingStyle is 'atx' (its own default, or an explicit caller choice), but this level ${String(level)} heading's own content contains a line break ATX has no way to hold — rendered as setext instead, though the heading's own leading blank line is absorbed as ordinary space ahead of it on read-back rather than reproduced inside it` : `the effective WriteMarkdownOptions.headingStyle is 'atx' (its own default, or an explicit caller choice), but this level ${String(level)} heading's own content contains a line break ATX has no way to hold — rendered as setext instead so the break survives`
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
174
|
return renderSetextHeading(level, text);
|
package/dist/emit/table.cjs
CHANGED
|
@@ -63,7 +63,7 @@ function emitTable(table, context) {
|
|
|
63
63
|
context.sink({
|
|
64
64
|
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.TABLE_HTML_FALLBACK,
|
|
65
65
|
severity: "info",
|
|
66
|
-
message: "a cell in this table needs colSpan/rowSpan/background, or holds a block a GFM table cell cannot represent at all (most commonly a nested table); GFM's own table extension holds inline content only (github.github.com/gfm, \"Tables (extension)\"), so no single cell can carry an HTML sub-block inside an otherwise pipe-syntax table
|
|
66
|
+
message: "a cell in this table needs colSpan/rowSpan/background, or holds a block a GFM table cell cannot represent at all (most commonly a nested table); GFM's own table extension holds inline content only (github.github.com/gfm, \"Tables (extension)\"), so no single cell can carry an HTML sub-block inside an otherwise pipe-syntax table — the whole table is rendered as a raw HTML <table> block instead (CommonMark spec 0.31.2, HTML blocks condition 6, https://spec.commonmark.org/0.31.2/#html-blocks), which src/html/html-table.ts's own reader recognises back into an equal ContentTable"
|
|
67
67
|
});
|
|
68
68
|
return require_emit_html_table.emitHtmlTable(table, context);
|
|
69
69
|
}
|
package/dist/emit/table.js
CHANGED
|
@@ -62,7 +62,7 @@ function emitTable(table, context) {
|
|
|
62
62
|
context.sink({
|
|
63
63
|
code: MarkdownDiagnosticCodes.TABLE_HTML_FALLBACK,
|
|
64
64
|
severity: "info",
|
|
65
|
-
message: "a cell in this table needs colSpan/rowSpan/background, or holds a block a GFM table cell cannot represent at all (most commonly a nested table); GFM's own table extension holds inline content only (github.github.com/gfm, \"Tables (extension)\"), so no single cell can carry an HTML sub-block inside an otherwise pipe-syntax table
|
|
65
|
+
message: "a cell in this table needs colSpan/rowSpan/background, or holds a block a GFM table cell cannot represent at all (most commonly a nested table); GFM's own table extension holds inline content only (github.github.com/gfm, \"Tables (extension)\"), so no single cell can carry an HTML sub-block inside an otherwise pipe-syntax table — the whole table is rendered as a raw HTML <table> block instead (CommonMark spec 0.31.2, HTML blocks condition 6, https://spec.commonmark.org/0.31.2/#html-blocks), which src/html/html-table.ts's own reader recognises back into an equal ContentTable"
|
|
66
66
|
});
|
|
67
67
|
return emitHtmlTable(table, context);
|
|
68
68
|
}
|
package/dist/lower/lower.cjs
CHANGED
|
@@ -80,7 +80,7 @@ function lowerParagraph(node, context) {
|
|
|
80
80
|
if (context.list !== void 0) context.sink({
|
|
81
81
|
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.LIST_ITEM_BLOCK_UNLISTED,
|
|
82
82
|
severity: "info",
|
|
83
|
-
message: "a resolved image block directly inside a list item has no ContentListMembership field of its own
|
|
83
|
+
message: "a resolved image block directly inside a list item has no ContentListMembership field of its own — only ContentParagraph carries .list — so its association with the enclosing list item is lost"
|
|
84
84
|
});
|
|
85
85
|
const image = {
|
|
86
86
|
kind: "image",
|
|
@@ -159,7 +159,7 @@ function lowerHtmlBlock(node, context, contentWidthPt) {
|
|
|
159
159
|
if (context.list !== void 0) context.sink({
|
|
160
160
|
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.LIST_ITEM_BLOCK_UNLISTED,
|
|
161
161
|
severity: "info",
|
|
162
|
-
message: "an HTML-table block directly inside a list item has no ContentListMembership field of its own
|
|
162
|
+
message: "an HTML-table block directly inside a list item has no ContentListMembership field of its own — only ContentParagraph carries .list — so its association with the enclosing list item is lost"
|
|
163
163
|
});
|
|
164
164
|
return [table];
|
|
165
165
|
}
|
|
@@ -190,7 +190,7 @@ function lowerMathBlock(node, context) {
|
|
|
190
190
|
if (context.list !== void 0) context.sink({
|
|
191
191
|
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.LIST_ITEM_BLOCK_UNLISTED,
|
|
192
192
|
severity: "info",
|
|
193
|
-
message: "a display-math block directly inside a list item has no ContentListMembership field of its own
|
|
193
|
+
message: "a display-math block directly inside a list item has no ContentListMembership field of its own — only ContentParagraph carries .list — so its association with the enclosing list item is lost"
|
|
194
194
|
});
|
|
195
195
|
return [{
|
|
196
196
|
kind: "embeddedObject",
|
|
@@ -310,7 +310,7 @@ function lowerBlock(node, context, contentWidthPt) {
|
|
|
310
310
|
if (context.list !== void 0) context.sink({
|
|
311
311
|
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.LIST_ITEM_BLOCK_UNLISTED,
|
|
312
312
|
severity: "info",
|
|
313
|
-
message: "a table directly inside a list item has no ContentListMembership field of its own
|
|
313
|
+
message: "a table directly inside a list item has no ContentListMembership field of its own — only ContentParagraph carries .list — so its association with the enclosing list item is lost"
|
|
314
314
|
});
|
|
315
315
|
return [require_lower_table.lowerTable(node, contentWidthPt, inlineContext(context))];
|
|
316
316
|
case "document":
|
package/dist/lower/lower.js
CHANGED
|
@@ -79,7 +79,7 @@ function lowerParagraph(node, context) {
|
|
|
79
79
|
if (context.list !== void 0) context.sink({
|
|
80
80
|
code: MarkdownDiagnosticCodes.LIST_ITEM_BLOCK_UNLISTED,
|
|
81
81
|
severity: "info",
|
|
82
|
-
message: "a resolved image block directly inside a list item has no ContentListMembership field of its own
|
|
82
|
+
message: "a resolved image block directly inside a list item has no ContentListMembership field of its own — only ContentParagraph carries .list — so its association with the enclosing list item is lost"
|
|
83
83
|
});
|
|
84
84
|
const image = {
|
|
85
85
|
kind: "image",
|
|
@@ -158,7 +158,7 @@ function lowerHtmlBlock(node, context, contentWidthPt) {
|
|
|
158
158
|
if (context.list !== void 0) context.sink({
|
|
159
159
|
code: MarkdownDiagnosticCodes.LIST_ITEM_BLOCK_UNLISTED,
|
|
160
160
|
severity: "info",
|
|
161
|
-
message: "an HTML-table block directly inside a list item has no ContentListMembership field of its own
|
|
161
|
+
message: "an HTML-table block directly inside a list item has no ContentListMembership field of its own — only ContentParagraph carries .list — so its association with the enclosing list item is lost"
|
|
162
162
|
});
|
|
163
163
|
return [table];
|
|
164
164
|
}
|
|
@@ -189,7 +189,7 @@ function lowerMathBlock(node, context) {
|
|
|
189
189
|
if (context.list !== void 0) context.sink({
|
|
190
190
|
code: MarkdownDiagnosticCodes.LIST_ITEM_BLOCK_UNLISTED,
|
|
191
191
|
severity: "info",
|
|
192
|
-
message: "a display-math block directly inside a list item has no ContentListMembership field of its own
|
|
192
|
+
message: "a display-math block directly inside a list item has no ContentListMembership field of its own — only ContentParagraph carries .list — so its association with the enclosing list item is lost"
|
|
193
193
|
});
|
|
194
194
|
return [{
|
|
195
195
|
kind: "embeddedObject",
|
|
@@ -309,7 +309,7 @@ function lowerBlock(node, context, contentWidthPt) {
|
|
|
309
309
|
if (context.list !== void 0) context.sink({
|
|
310
310
|
code: MarkdownDiagnosticCodes.LIST_ITEM_BLOCK_UNLISTED,
|
|
311
311
|
severity: "info",
|
|
312
|
-
message: "a table directly inside a list item has no ContentListMembership field of its own
|
|
312
|
+
message: "a table directly inside a list item has no ContentListMembership field of its own — only ContentParagraph carries .list — so its association with the enclosing list item is lost"
|
|
313
313
|
});
|
|
314
314
|
return [lowerTable(node, contentWidthPt, inlineContext(context))];
|
|
315
315
|
case "document":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markdown-codec",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.2",
|
|
4
4
|
"description": "Hand-written CommonMark+GFM <-> DocumentTree codec, built on document-schema.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"license": "MIT",
|
|
84
84
|
"packageManager": "pnpm@12.4.1+sha512.2e81e399d73fe8390dab25e06aa788ab7a5908248d2f5a370f82b481147a6a7a367bf8048f9a6fdb6460f21a66f0542dedb8b94ca2c8723596741920b1656d4c",
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"byte-codec": "1.8.
|
|
87
|
-
"document-schema.js": "7.14.
|
|
86
|
+
"byte-codec": "1.8.1",
|
|
87
|
+
"document-schema.js": "7.14.1",
|
|
88
88
|
"zod": "4.4.3"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|