markdown-codec 11.0.2 → 11.1.1
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/block/block.d.cts +1 -1
- package/dist/block/block.d.ts +1 -1
- package/dist/block/definitions.d.cts +1 -1
- package/dist/block/definitions.d.ts +1 -1
- package/dist/diagnostics/diagnostics.cjs +2 -1
- package/dist/diagnostics/diagnostics.d.cts +1 -1
- package/dist/diagnostics/diagnostics.d.ts +1 -1
- package/dist/diagnostics/diagnostics.js +2 -1
- package/dist/{diagnostics-DpAXEzZP.d.cts → diagnostics-D3UiC9HL.d.cts} +1 -0
- package/dist/{diagnostics-DpAXEzZP.d.ts → diagnostics-D3UiC9HL.d.ts} +1 -0
- package/dist/emit/inline.d.cts +1 -1
- package/dist/emit/inline.d.ts +1 -1
- package/dist/emit/table.cjs +9 -0
- package/dist/emit/table.d.cts +2 -2
- package/dist/emit/table.d.ts +2 -2
- package/dist/emit/table.js +9 -0
- package/dist/html/html-table.cjs +1 -1
- package/dist/html/html-table.js +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/{inline-BJj81pYp.d.ts → inline-CGUpYV28.d.ts} +1 -1
- package/dist/{inline-DD4bcJFT.d.cts → inline-DEF-eo9X.d.cts} +1 -1
- package/dist/lower/front-matter.d.cts +1 -1
- package/dist/lower/front-matter.d.ts +1 -1
- package/dist/lower/inline.d.cts +1 -1
- package/dist/lower/inline.d.ts +1 -1
- package/dist/lower/table.cjs +2 -2
- package/dist/lower/table.js +2 -2
- package/dist/options/options.d.cts +1 -1
- package/dist/options/options.d.ts +1 -1
- package/dist/read.d.cts +1 -1
- package/dist/read.d.ts +1 -1
- package/package.json +3 -3
package/dist/block/block.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as MarkdownDocumentNode } from "../ast-CNfTgS0N.cjs";
|
|
2
2
|
import { r as FootnoteLabelSet } from "../footnote-CKk4JbLk.cjs";
|
|
3
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
3
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-D3UiC9HL.cjs";
|
|
4
4
|
import { LinkReferenceMap } from "../inline/link.cjs";
|
|
5
5
|
import { t as InlineParseOptions } from "../inline-CnO86zMw.cjs";
|
|
6
6
|
//#region src/block/block.d.ts
|
package/dist/block/block.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as MarkdownDocumentNode } from "../ast-CNfTgS0N.js";
|
|
2
2
|
import { r as FootnoteLabelSet } from "../footnote-CKk4JbLk.js";
|
|
3
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
3
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-D3UiC9HL.js";
|
|
4
4
|
import { LinkReferenceMap } from "../inline/link.js";
|
|
5
5
|
import { t as InlineParseOptions } from "../inline-DItZ-VVw.js";
|
|
6
6
|
//#region src/block/block.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-D3UiC9HL.cjs";
|
|
2
2
|
import { LinkReferenceDefinition } from "../inline/link.cjs";
|
|
3
3
|
//#region src/block/definitions.d.ts
|
|
4
4
|
declare function extractDefinitions(content: string, references: Map<string, LinkReferenceDefinition>, sink?: MarkdownDiagnosticSink, startLine?: number): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-D3UiC9HL.js";
|
|
2
2
|
import { LinkReferenceDefinition } from "../inline/link.js";
|
|
3
3
|
//#region src/block/definitions.d.ts
|
|
4
4
|
declare function extractDefinitions(content: string, references: Map<string, LinkReferenceDefinition>, sink?: MarkdownDiagnosticSink, startLine?: number): string;
|
|
@@ -33,7 +33,8 @@ const MarkdownDiagnosticCodes = {
|
|
|
33
33
|
TABLE_CELL_MULTI_PARAGRAPH_JOINED: "md/table-cell-multi-paragraph-joined",
|
|
34
34
|
TABLE_CELL_IMAGE_DEGRADED: "md/table-cell-image-degraded",
|
|
35
35
|
TABLE_HTML_FALLBACK: "md/table-html-fallback",
|
|
36
|
-
TABLE_HEADER_ROW_SYNTHESISED: "md/table-header-row-synthesised"
|
|
36
|
+
TABLE_HEADER_ROW_SYNTHESISED: "md/table-header-row-synthesised",
|
|
37
|
+
TABLE_HEADER_COLUMN_DROPPED: "md/table-header-column-dropped"
|
|
37
38
|
};
|
|
38
39
|
var MarkdownParseError = class extends Error {
|
|
39
40
|
code;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MarkdownInputTooLargeError, c as MarkdownPackageFlattenError, d as MarkdownUnbalancedConstructMarkersError, f as MarkdownUndecodableTextError, h as NOOP_MARKDOWN_DIAGNOSTIC_SINK, i as MarkdownDiagnosticSink, l as MarkdownParseError, m as MarkdownWriteError, n as MarkdownDiagnosticCodes, o as MarkdownInvalidRunConstructExtentError, p as MarkdownUnsupportedDocumentKindError, r as MarkdownDiagnosticSeverity, s as MarkdownNestingLimitExceededError, t as MarkdownDiagnostic, u as MarkdownTableGridFaultError } from "../diagnostics-
|
|
1
|
+
import { a as MarkdownInputTooLargeError, c as MarkdownPackageFlattenError, d as MarkdownUnbalancedConstructMarkersError, f as MarkdownUndecodableTextError, h as NOOP_MARKDOWN_DIAGNOSTIC_SINK, i as MarkdownDiagnosticSink, l as MarkdownParseError, m as MarkdownWriteError, n as MarkdownDiagnosticCodes, o as MarkdownInvalidRunConstructExtentError, p as MarkdownUnsupportedDocumentKindError, r as MarkdownDiagnosticSeverity, s as MarkdownNestingLimitExceededError, t as MarkdownDiagnostic, u as MarkdownTableGridFaultError } from "../diagnostics-D3UiC9HL.cjs";
|
|
2
2
|
export { MarkdownDiagnostic, MarkdownDiagnosticCodes, MarkdownDiagnosticSeverity, MarkdownDiagnosticSink, MarkdownInputTooLargeError, MarkdownInvalidRunConstructExtentError, MarkdownNestingLimitExceededError, MarkdownPackageFlattenError, MarkdownParseError, MarkdownTableGridFaultError, MarkdownUnbalancedConstructMarkersError, MarkdownUndecodableTextError, MarkdownUnsupportedDocumentKindError, MarkdownWriteError, NOOP_MARKDOWN_DIAGNOSTIC_SINK };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MarkdownInputTooLargeError, c as MarkdownPackageFlattenError, d as MarkdownUnbalancedConstructMarkersError, f as MarkdownUndecodableTextError, h as NOOP_MARKDOWN_DIAGNOSTIC_SINK, i as MarkdownDiagnosticSink, l as MarkdownParseError, m as MarkdownWriteError, n as MarkdownDiagnosticCodes, o as MarkdownInvalidRunConstructExtentError, p as MarkdownUnsupportedDocumentKindError, r as MarkdownDiagnosticSeverity, s as MarkdownNestingLimitExceededError, t as MarkdownDiagnostic, u as MarkdownTableGridFaultError } from "../diagnostics-
|
|
1
|
+
import { a as MarkdownInputTooLargeError, c as MarkdownPackageFlattenError, d as MarkdownUnbalancedConstructMarkersError, f as MarkdownUndecodableTextError, h as NOOP_MARKDOWN_DIAGNOSTIC_SINK, i as MarkdownDiagnosticSink, l as MarkdownParseError, m as MarkdownWriteError, n as MarkdownDiagnosticCodes, o as MarkdownInvalidRunConstructExtentError, p as MarkdownUnsupportedDocumentKindError, r as MarkdownDiagnosticSeverity, s as MarkdownNestingLimitExceededError, t as MarkdownDiagnostic, u as MarkdownTableGridFaultError } from "../diagnostics-D3UiC9HL.js";
|
|
2
2
|
export { MarkdownDiagnostic, MarkdownDiagnosticCodes, MarkdownDiagnosticSeverity, MarkdownDiagnosticSink, MarkdownInputTooLargeError, MarkdownInvalidRunConstructExtentError, MarkdownNestingLimitExceededError, MarkdownPackageFlattenError, MarkdownParseError, MarkdownTableGridFaultError, MarkdownUnbalancedConstructMarkersError, MarkdownUndecodableTextError, MarkdownUnsupportedDocumentKindError, MarkdownWriteError, NOOP_MARKDOWN_DIAGNOSTIC_SINK };
|
|
@@ -32,7 +32,8 @@ const MarkdownDiagnosticCodes = {
|
|
|
32
32
|
TABLE_CELL_MULTI_PARAGRAPH_JOINED: "md/table-cell-multi-paragraph-joined",
|
|
33
33
|
TABLE_CELL_IMAGE_DEGRADED: "md/table-cell-image-degraded",
|
|
34
34
|
TABLE_HTML_FALLBACK: "md/table-html-fallback",
|
|
35
|
-
TABLE_HEADER_ROW_SYNTHESISED: "md/table-header-row-synthesised"
|
|
35
|
+
TABLE_HEADER_ROW_SYNTHESISED: "md/table-header-row-synthesised",
|
|
36
|
+
TABLE_HEADER_COLUMN_DROPPED: "md/table-header-column-dropped"
|
|
36
37
|
};
|
|
37
38
|
var MarkdownParseError = class extends Error {
|
|
38
39
|
code;
|
|
@@ -41,6 +41,7 @@ declare const MarkdownDiagnosticCodes: {
|
|
|
41
41
|
readonly TABLE_CELL_IMAGE_DEGRADED: "md/table-cell-image-degraded";
|
|
42
42
|
readonly TABLE_HTML_FALLBACK: "md/table-html-fallback";
|
|
43
43
|
readonly TABLE_HEADER_ROW_SYNTHESISED: "md/table-header-row-synthesised";
|
|
44
|
+
readonly TABLE_HEADER_COLUMN_DROPPED: "md/table-header-column-dropped";
|
|
44
45
|
};
|
|
45
46
|
declare class MarkdownParseError extends Error {
|
|
46
47
|
readonly code: string;
|
|
@@ -41,6 +41,7 @@ declare const MarkdownDiagnosticCodes: {
|
|
|
41
41
|
readonly TABLE_CELL_IMAGE_DEGRADED: "md/table-cell-image-degraded";
|
|
42
42
|
readonly TABLE_HTML_FALLBACK: "md/table-html-fallback";
|
|
43
43
|
readonly TABLE_HEADER_ROW_SYNTHESISED: "md/table-header-row-synthesised";
|
|
44
|
+
readonly TABLE_HEADER_COLUMN_DROPPED: "md/table-header-column-dropped";
|
|
44
45
|
};
|
|
45
46
|
declare class MarkdownParseError extends Error {
|
|
46
47
|
readonly code: string;
|
package/dist/emit/inline.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as escapeMarkdownText, i as escapeLinkDestination, n as emitRuns, o as renderLinkTitle, r as emitRunsSingleLine, t as InlineEmitContext } from "../inline-
|
|
1
|
+
import { a as escapeMarkdownText, i as escapeLinkDestination, n as emitRuns, o as renderLinkTitle, r as emitRunsSingleLine, t as InlineEmitContext } from "../inline-DEF-eo9X.cjs";
|
|
2
2
|
export { InlineEmitContext, emitRuns, emitRunsSingleLine, escapeLinkDestination, escapeMarkdownText, renderLinkTitle };
|
package/dist/emit/inline.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as escapeMarkdownText, i as escapeLinkDestination, n as emitRuns, o as renderLinkTitle, r as emitRunsSingleLine, t as InlineEmitContext } from "../inline-
|
|
1
|
+
import { a as escapeMarkdownText, i as escapeLinkDestination, n as emitRuns, o as renderLinkTitle, r as emitRunsSingleLine, t as InlineEmitContext } from "../inline-CGUpYV28.js";
|
|
2
2
|
export { InlineEmitContext, emitRuns, emitRunsSingleLine, escapeLinkDestination, escapeMarkdownText, renderLinkTitle };
|
package/dist/emit/table.cjs
CHANGED
|
@@ -58,7 +58,16 @@ function renderCellText(cell, context) {
|
|
|
58
58
|
}
|
|
59
59
|
return escapeUnescapedPipes(parts.join("<br>"));
|
|
60
60
|
}
|
|
61
|
+
function reportDroppedHeaderColumns(table, sink) {
|
|
62
|
+
if (!table.columns.some((column) => column.isHeader === true)) return;
|
|
63
|
+
sink({
|
|
64
|
+
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.TABLE_HEADER_COLUMN_DROPPED,
|
|
65
|
+
severity: "info",
|
|
66
|
+
message: "this table states one or more header columns (ODF's table:table-header-columns, a column repeated at the left of each printed page), and neither GFM's own table extension nor this package's own HTML-table fallback has syntax for stating which column that is, so the flag is dropped and will not read back"
|
|
67
|
+
});
|
|
68
|
+
}
|
|
61
69
|
function emitTable(table, context) {
|
|
70
|
+
reportDroppedHeaderColumns(table, context.sink);
|
|
62
71
|
if (require_emit_html_table.tableNeedsHtmlFallback(table)) {
|
|
63
72
|
context.sink({
|
|
64
73
|
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.TABLE_HTML_FALLBACK,
|
package/dist/emit/table.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
2
|
-
import { t as InlineEmitContext } from "../inline-
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-D3UiC9HL.cjs";
|
|
2
|
+
import { t as InlineEmitContext } from "../inline-DEF-eo9X.cjs";
|
|
3
3
|
import { ContentTable } from "document-schema.js";
|
|
4
4
|
//#region src/emit/table.d.ts
|
|
5
5
|
interface TableEmitContext extends InlineEmitContext {
|
package/dist/emit/table.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
2
|
-
import { t as InlineEmitContext } from "../inline-
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-D3UiC9HL.js";
|
|
2
|
+
import { t as InlineEmitContext } from "../inline-CGUpYV28.js";
|
|
3
3
|
import { ContentTable } from "document-schema.js";
|
|
4
4
|
//#region src/emit/table.d.ts
|
|
5
5
|
interface TableEmitContext extends InlineEmitContext {
|
package/dist/emit/table.js
CHANGED
|
@@ -57,7 +57,16 @@ function renderCellText(cell, context) {
|
|
|
57
57
|
}
|
|
58
58
|
return escapeUnescapedPipes(parts.join("<br>"));
|
|
59
59
|
}
|
|
60
|
+
function reportDroppedHeaderColumns(table, sink) {
|
|
61
|
+
if (!table.columns.some((column) => column.isHeader === true)) return;
|
|
62
|
+
sink({
|
|
63
|
+
code: MarkdownDiagnosticCodes.TABLE_HEADER_COLUMN_DROPPED,
|
|
64
|
+
severity: "info",
|
|
65
|
+
message: "this table states one or more header columns (ODF's table:table-header-columns, a column repeated at the left of each printed page), and neither GFM's own table extension nor this package's own HTML-table fallback has syntax for stating which column that is, so the flag is dropped and will not read back"
|
|
66
|
+
});
|
|
67
|
+
}
|
|
60
68
|
function emitTable(table, context) {
|
|
69
|
+
reportDroppedHeaderColumns(table, context.sink);
|
|
61
70
|
if (tableNeedsHtmlFallback(table)) {
|
|
62
71
|
context.sink({
|
|
63
72
|
code: MarkdownDiagnosticCodes.TABLE_HTML_FALLBACK,
|
package/dist/html/html-table.cjs
CHANGED
|
@@ -225,7 +225,7 @@ function buildContentTable(rows, contentWidthPt) {
|
|
|
225
225
|
return {
|
|
226
226
|
kind: "table",
|
|
227
227
|
rows,
|
|
228
|
-
|
|
228
|
+
columns: Array.from({ length: columnCount }, () => ({ widthPt: contentWidthPt / columnCount }))
|
|
229
229
|
};
|
|
230
230
|
}
|
|
231
231
|
function parseWholeTable(text, contentWidthPt) {
|
package/dist/html/html-table.js
CHANGED
|
@@ -224,7 +224,7 @@ function buildContentTable(rows, contentWidthPt) {
|
|
|
224
224
|
return {
|
|
225
225
|
kind: "table",
|
|
226
226
|
rows,
|
|
227
|
-
|
|
227
|
+
columns: Array.from({ length: columnCount }, () => ({ widthPt: contentWidthPt / columnCount }))
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
230
|
function parseWholeTable(text, contentWidthPt) {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as MarkdownInputTooLargeError, d as MarkdownUnbalancedConstructMarkersError, f as MarkdownUndecodableTextError, h as NOOP_MARKDOWN_DIAGNOSTIC_SINK, i as MarkdownDiagnosticSink, l as MarkdownParseError, m as MarkdownWriteError, n as MarkdownDiagnosticCodes, o as MarkdownInvalidRunConstructExtentError, p as MarkdownUnsupportedDocumentKindError, r as MarkdownDiagnosticSeverity, s as MarkdownNestingLimitExceededError, t as MarkdownDiagnostic, u as MarkdownTableGridFaultError } from "./diagnostics-
|
|
1
|
+
import { a as MarkdownInputTooLargeError, d as MarkdownUnbalancedConstructMarkersError, f as MarkdownUndecodableTextError, h as NOOP_MARKDOWN_DIAGNOSTIC_SINK, i as MarkdownDiagnosticSink, l as MarkdownParseError, m as MarkdownWriteError, n as MarkdownDiagnosticCodes, o as MarkdownInvalidRunConstructExtentError, p as MarkdownUnsupportedDocumentKindError, r as MarkdownDiagnosticSeverity, s as MarkdownNestingLimitExceededError, t as MarkdownDiagnostic, u as MarkdownTableGridFaultError } from "./diagnostics-D3UiC9HL.cjs";
|
|
2
2
|
import { MarkdownBytesSchema, markdownCodec, markdownContentCodec } from "./codec.cjs";
|
|
3
3
|
import { n as MarkdownImageResolver, r as MarkdownResolvedImageBytes, t as MarkdownImageResolveContext } from "./image-B6p0Ovgy.cjs";
|
|
4
4
|
import { MarkdownBulletListMarker, MarkdownCodeFenceChar, MarkdownEmphasisMarker, MarkdownHeadingStyle, MarkdownLineEnding, MarkdownOrderedListDelimiter, MarkdownThematicBreakChar, ReadMarkdownOptions, WriteMarkdownOptions, WriteMarkdownStyleOptions } from "./options/options.cjs";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as MarkdownInputTooLargeError, d as MarkdownUnbalancedConstructMarkersError, f as MarkdownUndecodableTextError, h as NOOP_MARKDOWN_DIAGNOSTIC_SINK, i as MarkdownDiagnosticSink, l as MarkdownParseError, m as MarkdownWriteError, n as MarkdownDiagnosticCodes, o as MarkdownInvalidRunConstructExtentError, p as MarkdownUnsupportedDocumentKindError, r as MarkdownDiagnosticSeverity, s as MarkdownNestingLimitExceededError, t as MarkdownDiagnostic, u as MarkdownTableGridFaultError } from "./diagnostics-
|
|
1
|
+
import { a as MarkdownInputTooLargeError, d as MarkdownUnbalancedConstructMarkersError, f as MarkdownUndecodableTextError, h as NOOP_MARKDOWN_DIAGNOSTIC_SINK, i as MarkdownDiagnosticSink, l as MarkdownParseError, m as MarkdownWriteError, n as MarkdownDiagnosticCodes, o as MarkdownInvalidRunConstructExtentError, p as MarkdownUnsupportedDocumentKindError, r as MarkdownDiagnosticSeverity, s as MarkdownNestingLimitExceededError, t as MarkdownDiagnostic, u as MarkdownTableGridFaultError } from "./diagnostics-D3UiC9HL.js";
|
|
2
2
|
import { MarkdownBytesSchema, markdownCodec, markdownContentCodec } from "./codec.js";
|
|
3
3
|
import { n as MarkdownImageResolver, r as MarkdownResolvedImageBytes, t as MarkdownImageResolveContext } from "./image-gR1vISI0.js";
|
|
4
4
|
import { MarkdownBulletListMarker, MarkdownCodeFenceChar, MarkdownEmphasisMarker, MarkdownHeadingStyle, MarkdownLineEnding, MarkdownOrderedListDelimiter, MarkdownThematicBreakChar, ReadMarkdownOptions, WriteMarkdownOptions, WriteMarkdownStyleOptions } from "./options/options.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as MarkdownDiagnosticSink } from "./diagnostics-
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "./diagnostics-D3UiC9HL.js";
|
|
2
2
|
import { ContentRun, RunConstructExtent } from "document-schema.js";
|
|
3
3
|
//#region src/emit/inline.d.ts
|
|
4
4
|
interface InlineEmitContext {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as MarkdownDiagnosticSink } from "./diagnostics-
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "./diagnostics-D3UiC9HL.cjs";
|
|
2
2
|
import { ContentRun, RunConstructExtent } from "document-schema.js";
|
|
3
3
|
//#region src/emit/inline.d.ts
|
|
4
4
|
interface InlineEmitContext {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-D3UiC9HL.cjs";
|
|
2
2
|
import { LayoutMetadata } from "document-schema.js";
|
|
3
3
|
//#region src/lower/front-matter.d.ts
|
|
4
4
|
interface FrontMatterResult {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-D3UiC9HL.js";
|
|
2
2
|
import { LayoutMetadata } from "document-schema.js";
|
|
3
3
|
//#region src/lower/front-matter.d.ts
|
|
4
4
|
interface FrontMatterResult {
|
package/dist/lower/inline.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v as MarkdownInlineNode } from "../ast-CNfTgS0N.cjs";
|
|
2
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
2
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-D3UiC9HL.cjs";
|
|
3
3
|
import { ContentRun, RunConstructExtent } from "document-schema.js";
|
|
4
4
|
//#region src/lower/inline.d.ts
|
|
5
5
|
interface InlineLowerContext {
|
package/dist/lower/inline.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v as MarkdownInlineNode } from "../ast-CNfTgS0N.js";
|
|
2
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
2
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-D3UiC9HL.js";
|
|
3
3
|
import { ContentRun, RunConstructExtent } from "document-schema.js";
|
|
4
4
|
//#region src/lower/inline.d.ts
|
|
5
5
|
interface InlineLowerContext {
|
package/dist/lower/table.cjs
CHANGED
|
@@ -17,14 +17,14 @@ function lowerTableCell(cell, alignment, context) {
|
|
|
17
17
|
}
|
|
18
18
|
function lowerTable(node, contentWidthPt, context) {
|
|
19
19
|
const columnCount = Math.max(MIN_COLUMN_COUNT, node.alignments.length);
|
|
20
|
-
const
|
|
20
|
+
const columns = Array.from({ length: columnCount }, () => ({ widthPt: contentWidthPt / columnCount }));
|
|
21
21
|
return {
|
|
22
22
|
kind: "table",
|
|
23
23
|
rows: node.children.map((row, rowIndex) => ({
|
|
24
24
|
cells: row.children.map((cell, index) => lowerTableCell(cell, node.alignments[index], context)),
|
|
25
25
|
...rowIndex === 0 ? { isHeader: true } : {}
|
|
26
26
|
})),
|
|
27
|
-
|
|
27
|
+
columns
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
//#endregion
|
package/dist/lower/table.js
CHANGED
|
@@ -16,14 +16,14 @@ function lowerTableCell(cell, alignment, context) {
|
|
|
16
16
|
}
|
|
17
17
|
function lowerTable(node, contentWidthPt, context) {
|
|
18
18
|
const columnCount = Math.max(MIN_COLUMN_COUNT, node.alignments.length);
|
|
19
|
-
const
|
|
19
|
+
const columns = Array.from({ length: columnCount }, () => ({ widthPt: contentWidthPt / columnCount }));
|
|
20
20
|
return {
|
|
21
21
|
kind: "table",
|
|
22
22
|
rows: node.children.map((row, rowIndex) => ({
|
|
23
23
|
cells: row.children.map((cell, index) => lowerTableCell(cell, node.alignments[index], context)),
|
|
24
24
|
...rowIndex === 0 ? { isHeader: true } : {}
|
|
25
25
|
})),
|
|
26
|
-
|
|
26
|
+
columns
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-D3UiC9HL.cjs";
|
|
2
2
|
import { n as MarkdownImageResolver } from "../image-B6p0Ovgy.cjs";
|
|
3
3
|
import { Margins, PageSize } from "document-schema.js";
|
|
4
4
|
//#region src/options/options.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-D3UiC9HL.js";
|
|
2
2
|
import { n as MarkdownImageResolver } from "../image-gR1vISI0.js";
|
|
3
3
|
import { Margins, PageSize } from "document-schema.js";
|
|
4
4
|
//#region src/options/options.d.ts
|
package/dist/read.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as MarkdownDiagnostic } from "./diagnostics-
|
|
1
|
+
import { t as MarkdownDiagnostic } from "./diagnostics-D3UiC9HL.cjs";
|
|
2
2
|
import { ReadMarkdownOptions } from "./options/options.cjs";
|
|
3
3
|
import { ContentDocument, DocumentTree } from "document-schema.js";
|
|
4
4
|
//#region src/read.d.ts
|
package/dist/read.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as MarkdownDiagnostic } from "./diagnostics-
|
|
1
|
+
import { t as MarkdownDiagnostic } from "./diagnostics-D3UiC9HL.js";
|
|
2
2
|
import { ReadMarkdownOptions } from "./options/options.js";
|
|
3
3
|
import { ContentDocument, DocumentTree } from "document-schema.js";
|
|
4
4
|
//#region src/read.d.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markdown-codec",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.1.1",
|
|
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.
|
|
87
|
-
"document-schema.js": "7.
|
|
86
|
+
"byte-codec": "1.9.0",
|
|
87
|
+
"document-schema.js": "7.15.0",
|
|
88
88
|
"zod": "4.4.3"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|