markdown-codec 5.0.3 → 6.1.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 +36 -35
- package/dist/ast/ast.d.cts +1 -1
- package/dist/ast/ast.d.ts +1 -1
- package/dist/{ast-8XCbjRQT.d.cts → ast-CNfTgS0N.d.cts} +35 -35
- package/dist/{ast-8XCbjRQT.d.ts → ast-CNfTgS0N.d.ts} +35 -35
- package/dist/block/block.d.cts +3 -3
- package/dist/block/block.d.ts +3 -3
- package/dist/block/definitions.d.cts +1 -1
- package/dist/block/definitions.d.ts +1 -1
- package/dist/block/node.d.cts +4 -4
- package/dist/block/node.d.ts +4 -4
- package/dist/block/table.d.cts +1 -1
- package/dist/block/table.d.ts +1 -1
- package/dist/codec.cjs +1 -1
- package/dist/codec.d.cts +10 -10
- package/dist/codec.d.ts +10 -10
- package/dist/codec.js +2 -2
- package/dist/defaults/defaults.d.cts +1 -1
- package/dist/defaults/defaults.d.ts +1 -1
- package/dist/diagnostics/diagnostics.d.cts +1 -1
- package/dist/diagnostics/diagnostics.d.ts +1 -1
- package/dist/{diagnostics-CkcSYZf1.d.cts → diagnostics-CH-xa2-s.d.cts} +5 -5
- package/dist/{diagnostics-CkcSYZf1.d.ts → diagnostics-CH-xa2-s.d.ts} +5 -5
- package/dist/emit/emit.cjs +1 -1
- package/dist/emit/emit.js +1 -1
- package/dist/emit/inline.cjs +2 -2
- package/dist/emit/inline.d.cts +3 -3
- package/dist/emit/inline.d.ts +3 -3
- package/dist/emit/inline.js +2 -2
- package/dist/emit/table.d.cts +1 -1
- package/dist/emit/table.d.ts +1 -1
- package/dist/html/render.d.cts +1 -1
- package/dist/html/render.d.ts +1 -1
- package/dist/image/image.cjs +4 -4
- package/dist/image/image.d.cts +1 -1
- package/dist/image/image.d.ts +1 -1
- package/dist/image/image.js +4 -4
- package/dist/{image-C4KYmz_L.d.cts → image-B5L0HpAJ.d.cts} +1 -1
- package/dist/{image-DescdRgq.d.cts → image-BtmTG4_a.d.cts} +1 -1
- package/dist/{image-DescdRgq.d.ts → image-BtmTG4_a.d.ts} +1 -1
- package/dist/{image-Cm3hT5PS.d.ts → image-C390OIB3.d.ts} +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/inline/delimiter.d.cts +2 -2
- package/dist/inline/delimiter.d.ts +2 -2
- package/dist/inline/inline.d.cts +1 -1
- package/dist/inline/inline.d.ts +1 -1
- package/dist/inline/node.d.cts +2 -2
- package/dist/inline/node.d.ts +2 -2
- package/dist/{inline-CoS1JzxI.d.cts → inline-CnO86zMw.d.cts} +1 -1
- package/dist/{inline-OGXVE6hB.d.ts → inline-DItZ-VVw.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/image.d.cts +1 -1
- package/dist/lower/image.d.ts +1 -1
- package/dist/lower/inline.d.cts +3 -3
- package/dist/lower/inline.d.ts +3 -3
- package/dist/lower/table.d.cts +1 -1
- package/dist/lower/table.d.ts +1 -1
- package/dist/options/options.d.cts +10 -10
- package/dist/options/options.d.ts +10 -10
- package/dist/read.cjs +1 -1
- package/dist/read.d.cts +3 -3
- package/dist/read.d.ts +3 -3
- package/dist/read.js +2 -2
- package/dist/scan/entity-table.cjs +2125 -2125
- package/dist/scan/entity-table.js +2125 -2125
- package/dist/shared/list-id.d.cts +3 -3
- package/dist/shared/list-id.d.ts +3 -3
- package/dist/write.cjs +2 -2
- package/dist/write.d.cts +2 -2
- package/dist/write.d.ts +2 -2
- package/dist/write.js +3 -3
- package/package.json +3 -12
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-CH-xa2-s.cjs";
|
|
2
2
|
import { MarkdownBytesSchema, markdownCodec, markdownContentCodec } from "./codec.cjs";
|
|
3
|
-
import { n as MarkdownImageResolver, r as MarkdownResolvedImageBytes, t as MarkdownImageResolveContext } from "./image-
|
|
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";
|
|
5
5
|
import { ReadMarkdownContentResult, ReadMarkdownResult, readMarkdown, readMarkdownContent } from "./read.cjs";
|
|
6
6
|
import { writeMarkdown, writeMarkdownContent } from "./write.cjs";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-CH-xa2-s.js";
|
|
2
2
|
import { MarkdownBytesSchema, markdownCodec, markdownContentCodec } from "./codec.js";
|
|
3
|
-
import { n as MarkdownImageResolver, r as MarkdownResolvedImageBytes, t as MarkdownImageResolveContext } from "./image-
|
|
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";
|
|
5
5
|
import { ReadMarkdownContentResult, ReadMarkdownResult, readMarkdown, readMarkdownContent } from "./read.js";
|
|
6
6
|
import { writeMarkdown, writeMarkdownContent } from "./write.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InlineNode } from "./node.cjs";
|
|
2
2
|
//#region src/inline/delimiter.d.ts
|
|
3
|
-
type DelimiterChar =
|
|
3
|
+
type DelimiterChar = "*" | "_" | "~";
|
|
4
4
|
declare function isDelimiterChar(char: string): char is DelimiterChar;
|
|
5
5
|
interface Delimiter {
|
|
6
6
|
readonly char: DelimiterChar;
|
|
@@ -23,7 +23,7 @@ declare class DelimiterStack {
|
|
|
23
23
|
push(char: DelimiterChar, run: DelimiterRun, node: InlineNode): void;
|
|
24
24
|
remove(delimiter: Delimiter): void;
|
|
25
25
|
}
|
|
26
|
-
type EmphasisWrapperFactory = (kind:
|
|
26
|
+
type EmphasisWrapperFactory = (kind: "emphasis" | "strong" | "strikethrough", marker: DelimiterChar) => InlineNode;
|
|
27
27
|
declare function processEmphasis(stack: DelimiterStack, stackBottom: Delimiter | undefined, createWrapper: EmphasisWrapperFactory): void;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { Delimiter, DelimiterChar, DelimiterRun, DelimiterStack, EmphasisWrapperFactory, isDelimiterChar, processEmphasis, scanDelimiterRun };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InlineNode } from "./node.js";
|
|
2
2
|
//#region src/inline/delimiter.d.ts
|
|
3
|
-
type DelimiterChar =
|
|
3
|
+
type DelimiterChar = "*" | "_" | "~";
|
|
4
4
|
declare function isDelimiterChar(char: string): char is DelimiterChar;
|
|
5
5
|
interface Delimiter {
|
|
6
6
|
readonly char: DelimiterChar;
|
|
@@ -23,7 +23,7 @@ declare class DelimiterStack {
|
|
|
23
23
|
push(char: DelimiterChar, run: DelimiterRun, node: InlineNode): void;
|
|
24
24
|
remove(delimiter: Delimiter): void;
|
|
25
25
|
}
|
|
26
|
-
type EmphasisWrapperFactory = (kind:
|
|
26
|
+
type EmphasisWrapperFactory = (kind: "emphasis" | "strong" | "strikethrough", marker: DelimiterChar) => InlineNode;
|
|
27
27
|
declare function processEmphasis(stack: DelimiterStack, stackBottom: Delimiter | undefined, createWrapper: EmphasisWrapperFactory): void;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { Delimiter, DelimiterChar, DelimiterRun, DelimiterStack, EmphasisWrapperFactory, isDelimiterChar, processEmphasis, scanDelimiterRun };
|
package/dist/inline/inline.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as parseInlines, t as InlineParseOptions } from "../inline-
|
|
1
|
+
import { n as parseInlines, t as InlineParseOptions } from "../inline-CnO86zMw.cjs";
|
|
2
2
|
export { InlineParseOptions, parseInlines };
|
package/dist/inline/inline.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as parseInlines, t as InlineParseOptions } from "../inline-
|
|
1
|
+
import { n as parseInlines, t as InlineParseOptions } from "../inline-DItZ-VVw.js";
|
|
2
2
|
export { InlineParseOptions, parseInlines };
|
package/dist/inline/node.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
//#region src/inline/node.d.ts
|
|
2
|
-
type InlineNodeKind =
|
|
2
|
+
type InlineNodeKind = "text" | "emphasis" | "strong" | "strikethrough" | "codeSpan" | "link" | "image" | "autolink" | "hardBreak" | "softBreak" | "rawHtml" | "entity" | "mathInline" | "footnoteReference" | "container";
|
|
3
3
|
declare class InlineNode {
|
|
4
4
|
readonly kind: InlineNodeKind;
|
|
5
5
|
literal: string;
|
|
6
6
|
destination: string;
|
|
7
7
|
title: string | undefined;
|
|
8
8
|
email: boolean;
|
|
9
|
-
marker:
|
|
9
|
+
marker: "_" | "*";
|
|
10
10
|
raw: string;
|
|
11
11
|
label: string;
|
|
12
12
|
parent: InlineNode | undefined;
|
package/dist/inline/node.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
//#region src/inline/node.d.ts
|
|
2
|
-
type InlineNodeKind =
|
|
2
|
+
type InlineNodeKind = "text" | "emphasis" | "strong" | "strikethrough" | "codeSpan" | "link" | "image" | "autolink" | "hardBreak" | "softBreak" | "rawHtml" | "entity" | "mathInline" | "footnoteReference" | "container";
|
|
3
3
|
declare class InlineNode {
|
|
4
4
|
readonly kind: InlineNodeKind;
|
|
5
5
|
literal: string;
|
|
6
6
|
destination: string;
|
|
7
7
|
title: string | undefined;
|
|
8
8
|
email: boolean;
|
|
9
|
-
marker:
|
|
9
|
+
marker: "_" | "*";
|
|
10
10
|
raw: string;
|
|
11
11
|
label: string;
|
|
12
12
|
parent: InlineNode | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { v as MarkdownInlineNode } from "./ast-
|
|
1
|
+
import { v as MarkdownInlineNode } from "./ast-CNfTgS0N.cjs";
|
|
2
2
|
import { r as FootnoteLabelSet } from "./footnote-CKk4JbLk.cjs";
|
|
3
3
|
import { LinkReferenceMap } from "./inline/link.cjs";
|
|
4
4
|
//#region src/inline/inline.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { v as MarkdownInlineNode } from "./ast-
|
|
1
|
+
import { v as MarkdownInlineNode } from "./ast-CNfTgS0N.js";
|
|
2
2
|
import { r as FootnoteLabelSet } from "./footnote-CKk4JbLk.js";
|
|
3
3
|
import { LinkReferenceMap } from "./inline/link.js";
|
|
4
4
|
//#region src/inline/inline.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-CH-xa2-s.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-CH-xa2-s.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/image.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as resolveMarkdownImage, i as ResolvedMarkdownImage, n as MarkdownImageResolver, r as MarkdownResolvedImageBytes, t as MarkdownImageResolveContext } from "../image-
|
|
1
|
+
import { a as resolveMarkdownImage, i as ResolvedMarkdownImage, n as MarkdownImageResolver, r as MarkdownResolvedImageBytes, t as MarkdownImageResolveContext } from "../image-B5L0HpAJ.cjs";
|
|
2
2
|
export { MarkdownImageResolveContext, MarkdownImageResolver, MarkdownResolvedImageBytes, ResolvedMarkdownImage, resolveMarkdownImage };
|
package/dist/lower/image.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as resolveMarkdownImage, i as ResolvedMarkdownImage, n as MarkdownImageResolver, r as MarkdownResolvedImageBytes, t as MarkdownImageResolveContext } from "../image-
|
|
1
|
+
import { a as resolveMarkdownImage, i as ResolvedMarkdownImage, n as MarkdownImageResolver, r as MarkdownResolvedImageBytes, t as MarkdownImageResolveContext } from "../image-C390OIB3.js";
|
|
2
2
|
export { MarkdownImageResolveContext, MarkdownImageResolver, MarkdownResolvedImageBytes, ResolvedMarkdownImage, resolveMarkdownImage };
|
package/dist/lower/inline.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { v as MarkdownInlineNode } from "../ast-
|
|
2
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
1
|
+
import { v as MarkdownInlineNode } from "../ast-CNfTgS0N.cjs";
|
|
2
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-CH-xa2-s.cjs";
|
|
3
3
|
import { ContentRun, RunConstructExtent } from "document-schema.js";
|
|
4
4
|
//#region src/lower/inline.d.ts
|
|
5
5
|
interface InlineLowerContext {
|
|
6
6
|
readonly sink: MarkdownDiagnosticSink;
|
|
7
|
-
readonly rawHtml:
|
|
7
|
+
readonly rawHtml: "preserve" | "drop";
|
|
8
8
|
}
|
|
9
9
|
interface InlineLowerResult {
|
|
10
10
|
readonly runs: ContentRun[];
|
package/dist/lower/inline.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { v as MarkdownInlineNode } from "../ast-
|
|
2
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
1
|
+
import { v as MarkdownInlineNode } from "../ast-CNfTgS0N.js";
|
|
2
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-CH-xa2-s.js";
|
|
3
3
|
import { ContentRun, RunConstructExtent } from "document-schema.js";
|
|
4
4
|
//#region src/lower/inline.d.ts
|
|
5
5
|
interface InlineLowerContext {
|
|
6
6
|
readonly sink: MarkdownDiagnosticSink;
|
|
7
|
-
readonly rawHtml:
|
|
7
|
+
readonly rawHtml: "preserve" | "drop";
|
|
8
8
|
}
|
|
9
9
|
interface InlineLowerResult {
|
|
10
10
|
readonly runs: ContentRun[];
|
package/dist/lower/table.d.cts
CHANGED
package/dist/lower/table.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
2
|
-
import { n as MarkdownImageResolver } from "../image-
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-CH-xa2-s.cjs";
|
|
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
|
|
5
5
|
interface ReadMarkdownOptions {
|
|
@@ -8,7 +8,7 @@ interface ReadMarkdownOptions {
|
|
|
8
8
|
readonly pageSize?: PageSize;
|
|
9
9
|
readonly margins?: Margins;
|
|
10
10
|
readonly images?: MarkdownImageResolver;
|
|
11
|
-
readonly rawHtml?:
|
|
11
|
+
readonly rawHtml?: "preserve" | "drop";
|
|
12
12
|
readonly frontMatter?: boolean;
|
|
13
13
|
readonly gfmTables?: boolean;
|
|
14
14
|
readonly gfmAutolinks?: boolean;
|
|
@@ -18,13 +18,13 @@ interface ReadMarkdownOptions {
|
|
|
18
18
|
readonly maxInputBytes?: number;
|
|
19
19
|
readonly maxBlockNesting?: number;
|
|
20
20
|
}
|
|
21
|
-
type MarkdownHeadingStyle =
|
|
22
|
-
type MarkdownBulletListMarker =
|
|
23
|
-
type MarkdownOrderedListDelimiter =
|
|
24
|
-
type MarkdownEmphasisMarker =
|
|
25
|
-
type MarkdownCodeFenceChar =
|
|
26
|
-
type MarkdownThematicBreakChar =
|
|
27
|
-
type MarkdownLineEnding =
|
|
21
|
+
type MarkdownHeadingStyle = "atx" | "setext";
|
|
22
|
+
type MarkdownBulletListMarker = "-" | "*" | "+";
|
|
23
|
+
type MarkdownOrderedListDelimiter = "." | ")";
|
|
24
|
+
type MarkdownEmphasisMarker = "_" | "*";
|
|
25
|
+
type MarkdownCodeFenceChar = "`" | "~";
|
|
26
|
+
type MarkdownThematicBreakChar = "-" | "_" | "*";
|
|
27
|
+
type MarkdownLineEnding = "lf" | "crlf";
|
|
28
28
|
interface WriteMarkdownStyleOptions {
|
|
29
29
|
readonly headingStyle?: MarkdownHeadingStyle;
|
|
30
30
|
readonly bulletListMarker?: MarkdownBulletListMarker;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as MarkdownDiagnosticSink } from "../diagnostics-
|
|
2
|
-
import { n as MarkdownImageResolver } from "../image-
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "../diagnostics-CH-xa2-s.js";
|
|
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
|
|
5
5
|
interface ReadMarkdownOptions {
|
|
@@ -8,7 +8,7 @@ interface ReadMarkdownOptions {
|
|
|
8
8
|
readonly pageSize?: PageSize;
|
|
9
9
|
readonly margins?: Margins;
|
|
10
10
|
readonly images?: MarkdownImageResolver;
|
|
11
|
-
readonly rawHtml?:
|
|
11
|
+
readonly rawHtml?: "preserve" | "drop";
|
|
12
12
|
readonly frontMatter?: boolean;
|
|
13
13
|
readonly gfmTables?: boolean;
|
|
14
14
|
readonly gfmAutolinks?: boolean;
|
|
@@ -18,13 +18,13 @@ interface ReadMarkdownOptions {
|
|
|
18
18
|
readonly maxInputBytes?: number;
|
|
19
19
|
readonly maxBlockNesting?: number;
|
|
20
20
|
}
|
|
21
|
-
type MarkdownHeadingStyle =
|
|
22
|
-
type MarkdownBulletListMarker =
|
|
23
|
-
type MarkdownOrderedListDelimiter =
|
|
24
|
-
type MarkdownEmphasisMarker =
|
|
25
|
-
type MarkdownCodeFenceChar =
|
|
26
|
-
type MarkdownThematicBreakChar =
|
|
27
|
-
type MarkdownLineEnding =
|
|
21
|
+
type MarkdownHeadingStyle = "atx" | "setext";
|
|
22
|
+
type MarkdownBulletListMarker = "-" | "*" | "+";
|
|
23
|
+
type MarkdownOrderedListDelimiter = "." | ")";
|
|
24
|
+
type MarkdownEmphasisMarker = "_" | "*";
|
|
25
|
+
type MarkdownCodeFenceChar = "`" | "~";
|
|
26
|
+
type MarkdownThematicBreakChar = "-" | "_" | "*";
|
|
27
|
+
type MarkdownLineEnding = "lf" | "crlf";
|
|
28
28
|
interface WriteMarkdownStyleOptions {
|
|
29
29
|
readonly headingStyle?: MarkdownHeadingStyle;
|
|
30
30
|
readonly bulletListMarker?: MarkdownBulletListMarker;
|
package/dist/read.cjs
CHANGED
|
@@ -32,7 +32,7 @@ function linkDefinitionEntries(references) {
|
|
|
32
32
|
}
|
|
33
33
|
function readMarkdown(text, options = {}) {
|
|
34
34
|
const detail = readMarkdownDetail(text, options);
|
|
35
|
-
const assembled = (0, document_schema_js.
|
|
35
|
+
const assembled = (0, document_schema_js.assembleTree)(detail.document);
|
|
36
36
|
const definitions = linkDefinitionEntries(detail.references);
|
|
37
37
|
const frontMatterResidue = detail.frontMatterSource === void 0 ? void 0 : {
|
|
38
38
|
format: "markdown",
|
package/dist/read.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as MarkdownDiagnostic } from "./diagnostics-
|
|
1
|
+
import { t as MarkdownDiagnostic } from "./diagnostics-CH-xa2-s.cjs";
|
|
2
2
|
import { ReadMarkdownOptions } from "./options/options.cjs";
|
|
3
|
-
import { ContentDocument,
|
|
3
|
+
import { ContentDocument, DocumentTree } from "document-schema.js";
|
|
4
4
|
//#region src/read.d.ts
|
|
5
5
|
interface ReadMarkdownResult {
|
|
6
|
-
readonly documentPackage:
|
|
6
|
+
readonly documentPackage: DocumentTree;
|
|
7
7
|
readonly diagnostics: readonly MarkdownDiagnostic[];
|
|
8
8
|
}
|
|
9
9
|
interface ReadMarkdownContentResult {
|
package/dist/read.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as MarkdownDiagnostic } from "./diagnostics-
|
|
1
|
+
import { t as MarkdownDiagnostic } from "./diagnostics-CH-xa2-s.js";
|
|
2
2
|
import { ReadMarkdownOptions } from "./options/options.js";
|
|
3
|
-
import { ContentDocument,
|
|
3
|
+
import { ContentDocument, DocumentTree } from "document-schema.js";
|
|
4
4
|
//#region src/read.d.ts
|
|
5
5
|
interface ReadMarkdownResult {
|
|
6
|
-
readonly documentPackage:
|
|
6
|
+
readonly documentPackage: DocumentTree;
|
|
7
7
|
readonly diagnostics: readonly MarkdownDiagnostic[];
|
|
8
8
|
}
|
|
9
9
|
interface ReadMarkdownContentResult {
|
package/dist/read.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { lowerMarkdownDetailed } from "./lower/lower.js";
|
|
2
|
-
import {
|
|
2
|
+
import { assembleTree } from "document-schema.js";
|
|
3
3
|
//#region src/read.ts
|
|
4
4
|
function readMarkdownDetail(text, options) {
|
|
5
5
|
options.signal?.throwIfAborted();
|
|
@@ -31,7 +31,7 @@ function linkDefinitionEntries(references) {
|
|
|
31
31
|
}
|
|
32
32
|
function readMarkdown(text, options = {}) {
|
|
33
33
|
const detail = readMarkdownDetail(text, options);
|
|
34
|
-
const assembled =
|
|
34
|
+
const assembled = assembleTree(detail.document);
|
|
35
35
|
const definitions = linkDefinitionEntries(detail.references);
|
|
36
36
|
const frontMatterResidue = detail.frontMatterSource === void 0 ? void 0 : {
|
|
37
37
|
format: "markdown",
|