markdown-codec 6.5.2 → 6.6.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/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 +0 -2
- package/dist/diagnostics/diagnostics.d.cts +1 -1
- package/dist/diagnostics/diagnostics.d.ts +1 -1
- package/dist/diagnostics/diagnostics.js +0 -2
- package/dist/{diagnostics-DLum7kY6.d.cts → diagnostics-CjfBoW4K.d.cts} +0 -2
- package/dist/{diagnostics-DLum7kY6.d.ts → diagnostics-CjfBoW4K.d.ts} +0 -2
- package/dist/emit/inline.d.cts +1 -1
- package/dist/emit/inline.d.ts +1 -1
- package/dist/emit/table.d.cts +2 -2
- package/dist/emit/table.d.ts +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/{inline-514HW3Pi.d.cts → inline-DCIKQ83j.d.cts} +1 -1
- package/dist/{inline-2-lUb0vo.d.ts → inline-INoDAG37.d.ts} +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/lower.cjs +5 -59
- package/dist/lower/lower.js +5 -59
- 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 +2 -2
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-CjfBoW4K.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-CjfBoW4K.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-CjfBoW4K.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-CjfBoW4K.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;
|
|
@@ -12,14 +12,12 @@ const MarkdownDiagnosticCodes = {
|
|
|
12
12
|
INVENTED_PAGE_GEOMETRY: "md/invented-page-geometry",
|
|
13
13
|
NESTED_EMPHASIS_FLATTENED: "md/nested-emphasis-flattened",
|
|
14
14
|
LINK_TITLE_DROPPED: "md/link-title-dropped",
|
|
15
|
-
BLOCKQUOTE_CONTAINER_SKIPPED: "md/blockquote-container-skipped",
|
|
16
15
|
LIST_ITEM_BLOCK_UNLISTED: "md/list-item-block-unlisted",
|
|
17
16
|
IMAGE_UNRESOLVED: "md/image-unresolved",
|
|
18
17
|
RAW_HTML_PRESERVED_AS_TEXT: "md/raw-html-preserved-as-text",
|
|
19
18
|
RAW_HTML_DROPPED: "md/raw-html-dropped",
|
|
20
19
|
MATH_INLINE_PRESERVED_AS_TEXT: "md/math-inline-preserved-as-text",
|
|
21
20
|
FRONT_MATTER_KEY_UNMAPPED: "md/front-matter-key-unmapped",
|
|
22
|
-
FOOTNOTE_BODY_HEADING_FLATTENED: "md/footnote-body-heading-flattened",
|
|
23
21
|
CONSTRUCT_UNREPRESENTED: "md/construct-unrepresented",
|
|
24
22
|
PACKAGE_TABLE_DROPPED: "md/package-table-dropped",
|
|
25
23
|
HEADING_LEVEL_CLAMPED: "md/heading-level-clamped",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MarkdownInputTooLargeError, c as MarkdownNestingLimitExceededError, d as MarkdownUnbalancedConstructMarkersError, f as MarkdownUnsupportedDocumentKindError, i as MarkdownDiagnosticSink, l as MarkdownPackageFlattenError, m as NOOP_MARKDOWN_DIAGNOSTIC_SINK, n as MarkdownDiagnosticCodes, o as MarkdownInvalidRunConstructExtentError, p as MarkdownWriteError, r as MarkdownDiagnosticSeverity, s as MarkdownInvalidUtf8Error, t as MarkdownDiagnostic, u as MarkdownParseError } from "../diagnostics-
|
|
1
|
+
import { a as MarkdownInputTooLargeError, c as MarkdownNestingLimitExceededError, d as MarkdownUnbalancedConstructMarkersError, f as MarkdownUnsupportedDocumentKindError, i as MarkdownDiagnosticSink, l as MarkdownPackageFlattenError, m as NOOP_MARKDOWN_DIAGNOSTIC_SINK, n as MarkdownDiagnosticCodes, o as MarkdownInvalidRunConstructExtentError, p as MarkdownWriteError, r as MarkdownDiagnosticSeverity, s as MarkdownInvalidUtf8Error, t as MarkdownDiagnostic, u as MarkdownParseError } from "../diagnostics-CjfBoW4K.cjs";
|
|
2
2
|
export { MarkdownDiagnostic, MarkdownDiagnosticCodes, MarkdownDiagnosticSeverity, MarkdownDiagnosticSink, MarkdownInputTooLargeError, MarkdownInvalidRunConstructExtentError, MarkdownInvalidUtf8Error, MarkdownNestingLimitExceededError, MarkdownPackageFlattenError, MarkdownParseError, MarkdownUnbalancedConstructMarkersError, MarkdownUnsupportedDocumentKindError, MarkdownWriteError, NOOP_MARKDOWN_DIAGNOSTIC_SINK };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MarkdownInputTooLargeError, c as MarkdownNestingLimitExceededError, d as MarkdownUnbalancedConstructMarkersError, f as MarkdownUnsupportedDocumentKindError, i as MarkdownDiagnosticSink, l as MarkdownPackageFlattenError, m as NOOP_MARKDOWN_DIAGNOSTIC_SINK, n as MarkdownDiagnosticCodes, o as MarkdownInvalidRunConstructExtentError, p as MarkdownWriteError, r as MarkdownDiagnosticSeverity, s as MarkdownInvalidUtf8Error, t as MarkdownDiagnostic, u as MarkdownParseError } from "../diagnostics-
|
|
1
|
+
import { a as MarkdownInputTooLargeError, c as MarkdownNestingLimitExceededError, d as MarkdownUnbalancedConstructMarkersError, f as MarkdownUnsupportedDocumentKindError, i as MarkdownDiagnosticSink, l as MarkdownPackageFlattenError, m as NOOP_MARKDOWN_DIAGNOSTIC_SINK, n as MarkdownDiagnosticCodes, o as MarkdownInvalidRunConstructExtentError, p as MarkdownWriteError, r as MarkdownDiagnosticSeverity, s as MarkdownInvalidUtf8Error, t as MarkdownDiagnostic, u as MarkdownParseError } from "../diagnostics-CjfBoW4K.js";
|
|
2
2
|
export { MarkdownDiagnostic, MarkdownDiagnosticCodes, MarkdownDiagnosticSeverity, MarkdownDiagnosticSink, MarkdownInputTooLargeError, MarkdownInvalidRunConstructExtentError, MarkdownInvalidUtf8Error, MarkdownNestingLimitExceededError, MarkdownPackageFlattenError, MarkdownParseError, MarkdownUnbalancedConstructMarkersError, MarkdownUnsupportedDocumentKindError, MarkdownWriteError, NOOP_MARKDOWN_DIAGNOSTIC_SINK };
|
|
@@ -11,14 +11,12 @@ const MarkdownDiagnosticCodes = {
|
|
|
11
11
|
INVENTED_PAGE_GEOMETRY: "md/invented-page-geometry",
|
|
12
12
|
NESTED_EMPHASIS_FLATTENED: "md/nested-emphasis-flattened",
|
|
13
13
|
LINK_TITLE_DROPPED: "md/link-title-dropped",
|
|
14
|
-
BLOCKQUOTE_CONTAINER_SKIPPED: "md/blockquote-container-skipped",
|
|
15
14
|
LIST_ITEM_BLOCK_UNLISTED: "md/list-item-block-unlisted",
|
|
16
15
|
IMAGE_UNRESOLVED: "md/image-unresolved",
|
|
17
16
|
RAW_HTML_PRESERVED_AS_TEXT: "md/raw-html-preserved-as-text",
|
|
18
17
|
RAW_HTML_DROPPED: "md/raw-html-dropped",
|
|
19
18
|
MATH_INLINE_PRESERVED_AS_TEXT: "md/math-inline-preserved-as-text",
|
|
20
19
|
FRONT_MATTER_KEY_UNMAPPED: "md/front-matter-key-unmapped",
|
|
21
|
-
FOOTNOTE_BODY_HEADING_FLATTENED: "md/footnote-body-heading-flattened",
|
|
22
20
|
CONSTRUCT_UNREPRESENTED: "md/construct-unrepresented",
|
|
23
21
|
PACKAGE_TABLE_DROPPED: "md/package-table-dropped",
|
|
24
22
|
HEADING_LEVEL_CLAMPED: "md/heading-level-clamped",
|
|
@@ -19,14 +19,12 @@ declare const MarkdownDiagnosticCodes: {
|
|
|
19
19
|
readonly INVENTED_PAGE_GEOMETRY: "md/invented-page-geometry";
|
|
20
20
|
readonly NESTED_EMPHASIS_FLATTENED: "md/nested-emphasis-flattened";
|
|
21
21
|
readonly LINK_TITLE_DROPPED: "md/link-title-dropped";
|
|
22
|
-
readonly BLOCKQUOTE_CONTAINER_SKIPPED: "md/blockquote-container-skipped";
|
|
23
22
|
readonly LIST_ITEM_BLOCK_UNLISTED: "md/list-item-block-unlisted";
|
|
24
23
|
readonly IMAGE_UNRESOLVED: "md/image-unresolved";
|
|
25
24
|
readonly RAW_HTML_PRESERVED_AS_TEXT: "md/raw-html-preserved-as-text";
|
|
26
25
|
readonly RAW_HTML_DROPPED: "md/raw-html-dropped";
|
|
27
26
|
readonly MATH_INLINE_PRESERVED_AS_TEXT: "md/math-inline-preserved-as-text";
|
|
28
27
|
readonly FRONT_MATTER_KEY_UNMAPPED: "md/front-matter-key-unmapped";
|
|
29
|
-
readonly FOOTNOTE_BODY_HEADING_FLATTENED: "md/footnote-body-heading-flattened";
|
|
30
28
|
readonly CONSTRUCT_UNREPRESENTED: "md/construct-unrepresented";
|
|
31
29
|
readonly PACKAGE_TABLE_DROPPED: "md/package-table-dropped";
|
|
32
30
|
readonly HEADING_LEVEL_CLAMPED: "md/heading-level-clamped";
|
|
@@ -19,14 +19,12 @@ declare const MarkdownDiagnosticCodes: {
|
|
|
19
19
|
readonly INVENTED_PAGE_GEOMETRY: "md/invented-page-geometry";
|
|
20
20
|
readonly NESTED_EMPHASIS_FLATTENED: "md/nested-emphasis-flattened";
|
|
21
21
|
readonly LINK_TITLE_DROPPED: "md/link-title-dropped";
|
|
22
|
-
readonly BLOCKQUOTE_CONTAINER_SKIPPED: "md/blockquote-container-skipped";
|
|
23
22
|
readonly LIST_ITEM_BLOCK_UNLISTED: "md/list-item-block-unlisted";
|
|
24
23
|
readonly IMAGE_UNRESOLVED: "md/image-unresolved";
|
|
25
24
|
readonly RAW_HTML_PRESERVED_AS_TEXT: "md/raw-html-preserved-as-text";
|
|
26
25
|
readonly RAW_HTML_DROPPED: "md/raw-html-dropped";
|
|
27
26
|
readonly MATH_INLINE_PRESERVED_AS_TEXT: "md/math-inline-preserved-as-text";
|
|
28
27
|
readonly FRONT_MATTER_KEY_UNMAPPED: "md/front-matter-key-unmapped";
|
|
29
|
-
readonly FOOTNOTE_BODY_HEADING_FLATTENED: "md/footnote-body-heading-flattened";
|
|
30
28
|
readonly CONSTRUCT_UNREPRESENTED: "md/construct-unrepresented";
|
|
31
29
|
readonly PACKAGE_TABLE_DROPPED: "md/package-table-dropped";
|
|
32
30
|
readonly HEADING_LEVEL_CLAMPED: "md/heading-level-clamped";
|
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-DCIKQ83j.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-INoDAG37.js";
|
|
2
2
|
export { InlineEmitContext, emitRuns, emitRunsSingleLine, escapeLinkDestination, escapeMarkdownText, renderLinkTitle };
|
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-CjfBoW4K.cjs";
|
|
2
|
+
import { t as InlineEmitContext } from "../inline-DCIKQ83j.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-CjfBoW4K.js";
|
|
2
|
+
import { t as InlineEmitContext } from "../inline-INoDAG37.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/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as MarkdownInputTooLargeError, c as MarkdownNestingLimitExceededError, d as MarkdownUnbalancedConstructMarkersError, f as MarkdownUnsupportedDocumentKindError, i as MarkdownDiagnosticSink, m as NOOP_MARKDOWN_DIAGNOSTIC_SINK, n as MarkdownDiagnosticCodes, o as MarkdownInvalidRunConstructExtentError, p as MarkdownWriteError, r as MarkdownDiagnosticSeverity, s as MarkdownInvalidUtf8Error, t as MarkdownDiagnostic, u as MarkdownParseError } from "./diagnostics-
|
|
1
|
+
import { a as MarkdownInputTooLargeError, c as MarkdownNestingLimitExceededError, d as MarkdownUnbalancedConstructMarkersError, f as MarkdownUnsupportedDocumentKindError, i as MarkdownDiagnosticSink, m as NOOP_MARKDOWN_DIAGNOSTIC_SINK, n as MarkdownDiagnosticCodes, o as MarkdownInvalidRunConstructExtentError, p as MarkdownWriteError, r as MarkdownDiagnosticSeverity, s as MarkdownInvalidUtf8Error, t as MarkdownDiagnostic, u as MarkdownParseError } from "./diagnostics-CjfBoW4K.cjs";
|
|
2
2
|
import { MarkdownBytesSchema, markdownCodec, markdownContentCodec } from "./codec.cjs";
|
|
3
3
|
import { n as MarkdownImageResolver, r as MarkdownResolvedImageBytes, t as MarkdownImageResolveContext } from "./image-B5L0HpAJ.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, c as MarkdownNestingLimitExceededError, d as MarkdownUnbalancedConstructMarkersError, f as MarkdownUnsupportedDocumentKindError, i as MarkdownDiagnosticSink, m as NOOP_MARKDOWN_DIAGNOSTIC_SINK, n as MarkdownDiagnosticCodes, o as MarkdownInvalidRunConstructExtentError, p as MarkdownWriteError, r as MarkdownDiagnosticSeverity, s as MarkdownInvalidUtf8Error, t as MarkdownDiagnostic, u as MarkdownParseError } from "./diagnostics-
|
|
1
|
+
import { a as MarkdownInputTooLargeError, c as MarkdownNestingLimitExceededError, d as MarkdownUnbalancedConstructMarkersError, f as MarkdownUnsupportedDocumentKindError, i as MarkdownDiagnosticSink, m as NOOP_MARKDOWN_DIAGNOSTIC_SINK, n as MarkdownDiagnosticCodes, o as MarkdownInvalidRunConstructExtentError, p as MarkdownWriteError, r as MarkdownDiagnosticSeverity, s as MarkdownInvalidUtf8Error, t as MarkdownDiagnostic, u as MarkdownParseError } from "./diagnostics-CjfBoW4K.js";
|
|
2
2
|
import { MarkdownBytesSchema, markdownCodec, markdownContentCodec } from "./codec.js";
|
|
3
3
|
import { n as MarkdownImageResolver, r as MarkdownResolvedImageBytes, t as MarkdownImageResolveContext } from "./image-C390OIB3.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-CjfBoW4K.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-CjfBoW4K.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-CjfBoW4K.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-CjfBoW4K.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-CjfBoW4K.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-CjfBoW4K.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/lower.cjs
CHANGED
|
@@ -212,42 +212,21 @@ function lowerMathBlock(node, context) {
|
|
|
212
212
|
}
|
|
213
213
|
}];
|
|
214
214
|
}
|
|
215
|
-
function blockquoteSubtreeContainsHeading(node) {
|
|
216
|
-
const walk = (block) => {
|
|
217
|
-
switch (block.type) {
|
|
218
|
-
case "heading": return true;
|
|
219
|
-
case "blockquote":
|
|
220
|
-
case "list":
|
|
221
|
-
case "listItem": return block.children.some(walk);
|
|
222
|
-
default: return false;
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
|
-
return node.children.some(walk);
|
|
226
|
-
}
|
|
227
215
|
function lowerBlockquote(node, context, contentWidthPt) {
|
|
228
216
|
const nested = {
|
|
229
217
|
...context,
|
|
230
218
|
quoteDepth: context.quoteDepth + 1
|
|
231
219
|
};
|
|
232
220
|
const blocks = node.children.flatMap((child) => lowerBlock(child, nested, contentWidthPt));
|
|
233
|
-
const inner = blocks.length === 0 ? [decorateParagraph({
|
|
234
|
-
kind: "paragraph",
|
|
235
|
-
runs: []
|
|
236
|
-
}, nested)] : blocks;
|
|
237
|
-
if (blockquoteSubtreeContainsHeading(node)) {
|
|
238
|
-
context.sink({
|
|
239
|
-
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.BLOCKQUOTE_CONTAINER_SKIPPED,
|
|
240
|
-
severity: "info",
|
|
241
|
-
message: "a blockquote containing a heading cannot carry its division construct -- a marker extent may not open a heading scope, and the last heading inside an extent always leaves one standing -- so this quote degrades to indent-only structure while the heading keeps its heading fidelity"
|
|
242
|
-
});
|
|
243
|
-
return inner;
|
|
244
|
-
}
|
|
245
221
|
return [
|
|
246
222
|
{
|
|
247
223
|
kind: "constructStart",
|
|
248
224
|
descriptor: { kind: "division" }
|
|
249
225
|
},
|
|
250
|
-
...
|
|
226
|
+
...blocks.length === 0 ? [decorateParagraph({
|
|
227
|
+
kind: "paragraph",
|
|
228
|
+
runs: []
|
|
229
|
+
}, nested)] : blocks,
|
|
251
230
|
{ kind: "constructEnd" }
|
|
252
231
|
];
|
|
253
232
|
}
|
|
@@ -303,46 +282,13 @@ function lowerList(node, ancestorNumId, level, context, contentWidthPt) {
|
|
|
303
282
|
}
|
|
304
283
|
return node.children.flatMap((item) => lowerListItem(item, numId, level, context, contentWidthPt));
|
|
305
284
|
}
|
|
306
|
-
function flattenFootnoteBodyHeadings(node, context) {
|
|
307
|
-
switch (node.type) {
|
|
308
|
-
case "heading":
|
|
309
|
-
context.sink({
|
|
310
|
-
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.FOOTNOTE_BODY_HEADING_FLATTENED,
|
|
311
|
-
severity: "info",
|
|
312
|
-
message: `a level-${String(node.level)} heading inside a footnote definition's body is carried as literal ATX text: a construct boundary marker's extent may not contain a block that opens or closes a heading scope, so the heading cannot stay a heading inside the anchor construct the definition lowers to`
|
|
313
|
-
});
|
|
314
|
-
return {
|
|
315
|
-
type: "paragraph",
|
|
316
|
-
children: [{
|
|
317
|
-
type: "text",
|
|
318
|
-
value: `${"#".repeat(node.level)} `
|
|
319
|
-
}, ...node.children]
|
|
320
|
-
};
|
|
321
|
-
case "blockquote": return {
|
|
322
|
-
type: "blockquote",
|
|
323
|
-
children: node.children.map((child) => flattenFootnoteBodyHeadings(child, context))
|
|
324
|
-
};
|
|
325
|
-
case "list": return {
|
|
326
|
-
...node,
|
|
327
|
-
children: node.children.map((item) => flattenFootnoteBodyHeadingsInItem(item, context))
|
|
328
|
-
};
|
|
329
|
-
case "listItem": return flattenFootnoteBodyHeadingsInItem(node, context);
|
|
330
|
-
default: return node;
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
function flattenFootnoteBodyHeadingsInItem(item, context) {
|
|
334
|
-
return {
|
|
335
|
-
...item,
|
|
336
|
-
children: item.children.map((child) => flattenFootnoteBodyHeadings(child, context))
|
|
337
|
-
};
|
|
338
|
-
}
|
|
339
285
|
function lowerFootnoteDefinition(node, context, contentWidthPt) {
|
|
340
286
|
const descriptor = {
|
|
341
287
|
kind: "anchor",
|
|
342
288
|
anchorType: "footnote",
|
|
343
289
|
name: node.label
|
|
344
290
|
};
|
|
345
|
-
const body = node.children.flatMap((child) => lowerBlock(
|
|
291
|
+
const body = node.children.flatMap((child) => lowerBlock(child, context, contentWidthPt));
|
|
346
292
|
return [
|
|
347
293
|
{
|
|
348
294
|
kind: "constructStart",
|
package/dist/lower/lower.js
CHANGED
|
@@ -211,42 +211,21 @@ function lowerMathBlock(node, context) {
|
|
|
211
211
|
}
|
|
212
212
|
}];
|
|
213
213
|
}
|
|
214
|
-
function blockquoteSubtreeContainsHeading(node) {
|
|
215
|
-
const walk = (block) => {
|
|
216
|
-
switch (block.type) {
|
|
217
|
-
case "heading": return true;
|
|
218
|
-
case "blockquote":
|
|
219
|
-
case "list":
|
|
220
|
-
case "listItem": return block.children.some(walk);
|
|
221
|
-
default: return false;
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
return node.children.some(walk);
|
|
225
|
-
}
|
|
226
214
|
function lowerBlockquote(node, context, contentWidthPt) {
|
|
227
215
|
const nested = {
|
|
228
216
|
...context,
|
|
229
217
|
quoteDepth: context.quoteDepth + 1
|
|
230
218
|
};
|
|
231
219
|
const blocks = node.children.flatMap((child) => lowerBlock(child, nested, contentWidthPt));
|
|
232
|
-
const inner = blocks.length === 0 ? [decorateParagraph({
|
|
233
|
-
kind: "paragraph",
|
|
234
|
-
runs: []
|
|
235
|
-
}, nested)] : blocks;
|
|
236
|
-
if (blockquoteSubtreeContainsHeading(node)) {
|
|
237
|
-
context.sink({
|
|
238
|
-
code: MarkdownDiagnosticCodes.BLOCKQUOTE_CONTAINER_SKIPPED,
|
|
239
|
-
severity: "info",
|
|
240
|
-
message: "a blockquote containing a heading cannot carry its division construct -- a marker extent may not open a heading scope, and the last heading inside an extent always leaves one standing -- so this quote degrades to indent-only structure while the heading keeps its heading fidelity"
|
|
241
|
-
});
|
|
242
|
-
return inner;
|
|
243
|
-
}
|
|
244
220
|
return [
|
|
245
221
|
{
|
|
246
222
|
kind: "constructStart",
|
|
247
223
|
descriptor: { kind: "division" }
|
|
248
224
|
},
|
|
249
|
-
...
|
|
225
|
+
...blocks.length === 0 ? [decorateParagraph({
|
|
226
|
+
kind: "paragraph",
|
|
227
|
+
runs: []
|
|
228
|
+
}, nested)] : blocks,
|
|
250
229
|
{ kind: "constructEnd" }
|
|
251
230
|
];
|
|
252
231
|
}
|
|
@@ -302,46 +281,13 @@ function lowerList(node, ancestorNumId, level, context, contentWidthPt) {
|
|
|
302
281
|
}
|
|
303
282
|
return node.children.flatMap((item) => lowerListItem(item, numId, level, context, contentWidthPt));
|
|
304
283
|
}
|
|
305
|
-
function flattenFootnoteBodyHeadings(node, context) {
|
|
306
|
-
switch (node.type) {
|
|
307
|
-
case "heading":
|
|
308
|
-
context.sink({
|
|
309
|
-
code: MarkdownDiagnosticCodes.FOOTNOTE_BODY_HEADING_FLATTENED,
|
|
310
|
-
severity: "info",
|
|
311
|
-
message: `a level-${String(node.level)} heading inside a footnote definition's body is carried as literal ATX text: a construct boundary marker's extent may not contain a block that opens or closes a heading scope, so the heading cannot stay a heading inside the anchor construct the definition lowers to`
|
|
312
|
-
});
|
|
313
|
-
return {
|
|
314
|
-
type: "paragraph",
|
|
315
|
-
children: [{
|
|
316
|
-
type: "text",
|
|
317
|
-
value: `${"#".repeat(node.level)} `
|
|
318
|
-
}, ...node.children]
|
|
319
|
-
};
|
|
320
|
-
case "blockquote": return {
|
|
321
|
-
type: "blockquote",
|
|
322
|
-
children: node.children.map((child) => flattenFootnoteBodyHeadings(child, context))
|
|
323
|
-
};
|
|
324
|
-
case "list": return {
|
|
325
|
-
...node,
|
|
326
|
-
children: node.children.map((item) => flattenFootnoteBodyHeadingsInItem(item, context))
|
|
327
|
-
};
|
|
328
|
-
case "listItem": return flattenFootnoteBodyHeadingsInItem(node, context);
|
|
329
|
-
default: return node;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
function flattenFootnoteBodyHeadingsInItem(item, context) {
|
|
333
|
-
return {
|
|
334
|
-
...item,
|
|
335
|
-
children: item.children.map((child) => flattenFootnoteBodyHeadings(child, context))
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
284
|
function lowerFootnoteDefinition(node, context, contentWidthPt) {
|
|
339
285
|
const descriptor = {
|
|
340
286
|
kind: "anchor",
|
|
341
287
|
anchorType: "footnote",
|
|
342
288
|
name: node.label
|
|
343
289
|
};
|
|
344
|
-
const body = node.children.flatMap((child) => lowerBlock(
|
|
290
|
+
const body = node.children.flatMap((child) => lowerBlock(child, context, contentWidthPt));
|
|
345
291
|
return [
|
|
346
292
|
{
|
|
347
293
|
kind: "constructStart",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-CjfBoW4K.cjs";
|
|
2
2
|
import { n as MarkdownImageResolver } from "../image-B5L0HpAJ.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-CjfBoW4K.js";
|
|
2
2
|
import { n as MarkdownImageResolver } from "../image-C390OIB3.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-CjfBoW4K.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-CjfBoW4K.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": "6.
|
|
3
|
+
"version": "6.6.0",
|
|
4
4
|
"description": "Hand-written CommonMark+GFM <-> DocumentTree codec, built on document-schema.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"license": "MIT",
|
|
84
84
|
"packageManager": "pnpm@11.6.0",
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"document-schema.js": "7.5.
|
|
86
|
+
"document-schema.js": "7.5.1",
|
|
87
87
|
"zod": "4.4.3"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|