mrkdwn.js 4.0.6 → 6.6.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 +85 -66
- 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.cjs +12 -4
- package/dist/block/block.d.cts +9 -5
- package/dist/block/block.d.ts +9 -5
- package/dist/block/block.js +8 -4
- package/dist/block/definitions.d.cts +2 -2
- package/dist/block/definitions.d.ts +2 -2
- 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 +1631 -29
- package/dist/codec.d.ts +1631 -29
- 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.cjs +17 -7
- package/dist/diagnostics/diagnostics.d.cts +2 -2
- package/dist/diagnostics/diagnostics.d.ts +2 -2
- package/dist/diagnostics/diagnostics.js +17 -8
- package/dist/{diagnostics-BWK1iGy7.d.cts → diagnostics-CjfBoW4K.d.cts} +14 -10
- package/dist/{diagnostics-BWK1iGy7.d.ts → diagnostics-CjfBoW4K.d.ts} +14 -10
- package/dist/emit/emit.cjs +378 -42
- package/dist/emit/emit.js +381 -45
- package/dist/emit/front-matter.cjs +22 -5
- package/dist/emit/front-matter.js +22 -5
- package/dist/emit/html-table.cjs +104 -0
- package/dist/emit/html-table.d.cts +7 -0
- package/dist/emit/html-table.d.ts +7 -0
- package/dist/emit/html-table.js +102 -0
- package/dist/emit/inline.cjs +69 -26
- package/dist/emit/inline.d.cts +2 -12
- package/dist/emit/inline.d.ts +2 -12
- package/dist/emit/inline.js +68 -27
- package/dist/emit/table.cjs +18 -11
- package/dist/emit/table.d.cts +3 -2
- package/dist/emit/table.d.ts +3 -2
- package/dist/emit/table.js +18 -11
- package/dist/html/html-table.cjs +243 -0
- package/dist/html/html-table.d.cts +5 -0
- package/dist/html/html-table.d.ts +5 -0
- package/dist/html/html-table.js +242 -0
- 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.cjs +2 -2
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- 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/link.d.cts +17 -1
- package/dist/inline/link.d.ts +17 -1
- package/dist/inline/node.d.cts +2 -2
- package/dist/inline/node.d.ts +2 -2
- package/dist/{inline-CXVQWQnW.d.cts → inline-CnO86zMw.d.cts} +2 -2
- package/dist/inline-DCIKQ83j.d.cts +14 -0
- package/dist/{inline-B_V7bs5j.d.ts → inline-DItZ-VVw.d.ts} +2 -2
- package/dist/inline-INoDAG37.d.ts +14 -0
- package/dist/lower/front-matter.cjs +73 -26
- package/dist/lower/front-matter.d.cts +2 -1
- package/dist/lower/front-matter.d.ts +2 -1
- package/dist/lower/front-matter.js +72 -25
- package/dist/lower/image.d.cts +1 -1
- package/dist/lower/image.d.ts +1 -1
- package/dist/lower/inline.cjs +87 -33
- package/dist/lower/inline.d.cts +9 -12
- package/dist/lower/inline.d.ts +9 -12
- package/dist/lower/inline.js +89 -34
- package/dist/lower/lower.cjs +143 -113
- package/dist/lower/lower.d.cts +8 -1
- package/dist/lower/lower.d.ts +8 -1
- package/dist/lower/lower.js +144 -115
- package/dist/lower/table.cjs +3 -2
- package/dist/lower/table.d.cts +1 -1
- package/dist/lower/table.d.ts +1 -1
- package/dist/lower/table.js +3 -2
- package/dist/options/options.d.cts +10 -10
- package/dist/options/options.d.ts +10 -10
- package/dist/read.cjs +45 -9
- package/dist/read.d.cts +3 -3
- package/dist/read.d.ts +3 -3
- package/dist/read.js +47 -11
- package/dist/scan/entity-table.cjs +2125 -2125
- package/dist/scan/entity-table.js +2125 -2125
- package/dist/shared/line-ending.cjs +7 -0
- package/dist/shared/line-ending.d.cts +5 -0
- package/dist/shared/line-ending.d.ts +5 -0
- package/dist/shared/line-ending.js +5 -0
- package/dist/shared/list-id.cjs +11 -3
- package/dist/shared/list-id.d.cts +7 -4
- package/dist/shared/list-id.d.ts +7 -4
- package/dist/shared/list-id.js +11 -4
- package/dist/shared/style-constants.cjs +0 -2
- package/dist/shared/style-constants.d.cts +1 -2
- package/dist/shared/style-constants.d.ts +1 -2
- package/dist/shared/style-constants.js +1 -2
- package/dist/write.cjs +33 -6
- package/dist/write.d.cts +2 -2
- package/dist/write.d.ts +2 -2
- package/dist/write.js +34 -7
- package/package.json +29 -30
- package/dist/link-Dv4kxVjk.d.cts +0 -18
- package/dist/link-Dv4kxVjk.d.ts +0 -18
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_diagnostics_diagnostics = require("./diagnostics/diagnostics.cjs");
|
|
3
|
-
const require_shared_list_id = require("./shared/list-id.cjs");
|
|
4
3
|
const require_shared_style_constants = require("./shared/style-constants.cjs");
|
|
4
|
+
const require_shared_list_id = require("./shared/list-id.cjs");
|
|
5
5
|
const require_read = require("./read.cjs");
|
|
6
6
|
const require_write = require("./write.cjs");
|
|
7
7
|
const require_codec = require("./codec.cjs");
|
|
8
8
|
exports.CODE_BLOCK_STYLE_ID = require_shared_style_constants.CODE_BLOCK_STYLE_ID;
|
|
9
|
-
exports.FOOTNOTE_REFERENCE_FONT_MARKER = require_shared_style_constants.FOOTNOTE_REFERENCE_FONT_MARKER;
|
|
10
9
|
exports.HORIZONTAL_RULE_STYLE_ID = require_shared_style_constants.HORIZONTAL_RULE_STYLE_ID;
|
|
11
10
|
exports.HTML_PREFORMATTED_STYLE_ID = require_shared_style_constants.HTML_PREFORMATTED_STYLE_ID;
|
|
12
11
|
exports.MAX_HEADING_STYLE_LEVEL = require_shared_style_constants.MAX_HEADING_STYLE_LEVEL;
|
|
@@ -14,6 +13,7 @@ exports.MONOSPACE_FONT_FAMILY = require_shared_style_constants.MONOSPACE_FONT_FA
|
|
|
14
13
|
exports.MarkdownBytesSchema = require_codec.MarkdownBytesSchema;
|
|
15
14
|
exports.MarkdownDiagnosticCodes = require_diagnostics_diagnostics.MarkdownDiagnosticCodes;
|
|
16
15
|
exports.MarkdownInputTooLargeError = require_diagnostics_diagnostics.MarkdownInputTooLargeError;
|
|
16
|
+
exports.MarkdownInvalidRunConstructExtentError = require_diagnostics_diagnostics.MarkdownInvalidRunConstructExtentError;
|
|
17
17
|
exports.MarkdownInvalidUtf8Error = require_diagnostics_diagnostics.MarkdownInvalidUtf8Error;
|
|
18
18
|
exports.MarkdownNestingLimitExceededError = require_diagnostics_diagnostics.MarkdownNestingLimitExceededError;
|
|
19
19
|
exports.MarkdownParseError = require_diagnostics_diagnostics.MarkdownParseError;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as MarkdownInputTooLargeError, d as
|
|
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
|
-
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";
|
|
7
7
|
import { ListNumIdInfo, ListNumIdMintOptions, NumIdMintState, createNumIdMintState, mintListNumId, mintedListType, parseListNumId } from "./shared/list-id.cjs";
|
|
8
|
-
import { CODE_BLOCK_STYLE_ID,
|
|
9
|
-
export { CODE_BLOCK_STYLE_ID,
|
|
8
|
+
import { CODE_BLOCK_STYLE_ID, HORIZONTAL_RULE_STYLE_ID, HTML_PREFORMATTED_STYLE_ID, MAX_HEADING_STYLE_LEVEL, MONOSPACE_FONT_FAMILY, QUOTE_INDENT_PT, QUOTE_STYLE_ID, headingStyleId, parseHeadingStyleId } from "./shared/style-constants.cjs";
|
|
9
|
+
export { CODE_BLOCK_STYLE_ID, HORIZONTAL_RULE_STYLE_ID, HTML_PREFORMATTED_STYLE_ID, type ListNumIdInfo, type ListNumIdMintOptions, MAX_HEADING_STYLE_LEVEL, MONOSPACE_FONT_FAMILY, type MarkdownBulletListMarker, MarkdownBytesSchema, type MarkdownCodeFenceChar, type MarkdownDiagnostic, MarkdownDiagnosticCodes, type MarkdownDiagnosticSeverity, type MarkdownDiagnosticSink, type MarkdownEmphasisMarker, type MarkdownHeadingStyle, type MarkdownImageResolveContext, type MarkdownImageResolver, MarkdownInputTooLargeError, MarkdownInvalidRunConstructExtentError, MarkdownInvalidUtf8Error, type MarkdownLineEnding, MarkdownNestingLimitExceededError, type MarkdownOrderedListDelimiter, MarkdownParseError, type MarkdownResolvedImageBytes, type MarkdownThematicBreakChar, MarkdownUnbalancedConstructMarkersError, MarkdownUnsupportedDocumentKindError, MarkdownWriteError, NOOP_MARKDOWN_DIAGNOSTIC_SINK, type NumIdMintState, QUOTE_INDENT_PT, QUOTE_STYLE_ID, type ReadMarkdownContentResult, type ReadMarkdownOptions, type ReadMarkdownResult, type WriteMarkdownOptions, type WriteMarkdownStyleOptions, createNumIdMintState, headingStyleId, markdownCodec, markdownContentCodec, mintListNumId, mintedListType, parseHeadingStyleId, parseListNumId, readMarkdown, readMarkdownContent, writeMarkdown, writeMarkdownContent };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as MarkdownInputTooLargeError, d as
|
|
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
|
-
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";
|
|
7
7
|
import { ListNumIdInfo, ListNumIdMintOptions, NumIdMintState, createNumIdMintState, mintListNumId, mintedListType, parseListNumId } from "./shared/list-id.js";
|
|
8
|
-
import { CODE_BLOCK_STYLE_ID,
|
|
9
|
-
export { CODE_BLOCK_STYLE_ID,
|
|
8
|
+
import { CODE_BLOCK_STYLE_ID, HORIZONTAL_RULE_STYLE_ID, HTML_PREFORMATTED_STYLE_ID, MAX_HEADING_STYLE_LEVEL, MONOSPACE_FONT_FAMILY, QUOTE_INDENT_PT, QUOTE_STYLE_ID, headingStyleId, parseHeadingStyleId } from "./shared/style-constants.js";
|
|
9
|
+
export { CODE_BLOCK_STYLE_ID, HORIZONTAL_RULE_STYLE_ID, HTML_PREFORMATTED_STYLE_ID, type ListNumIdInfo, type ListNumIdMintOptions, MAX_HEADING_STYLE_LEVEL, MONOSPACE_FONT_FAMILY, type MarkdownBulletListMarker, MarkdownBytesSchema, type MarkdownCodeFenceChar, type MarkdownDiagnostic, MarkdownDiagnosticCodes, type MarkdownDiagnosticSeverity, type MarkdownDiagnosticSink, type MarkdownEmphasisMarker, type MarkdownHeadingStyle, type MarkdownImageResolveContext, type MarkdownImageResolver, MarkdownInputTooLargeError, MarkdownInvalidRunConstructExtentError, MarkdownInvalidUtf8Error, type MarkdownLineEnding, MarkdownNestingLimitExceededError, type MarkdownOrderedListDelimiter, MarkdownParseError, type MarkdownResolvedImageBytes, type MarkdownThematicBreakChar, MarkdownUnbalancedConstructMarkersError, MarkdownUnsupportedDocumentKindError, MarkdownWriteError, NOOP_MARKDOWN_DIAGNOSTIC_SINK, type NumIdMintState, QUOTE_INDENT_PT, QUOTE_STYLE_ID, type ReadMarkdownContentResult, type ReadMarkdownOptions, type ReadMarkdownResult, type WriteMarkdownOptions, type WriteMarkdownStyleOptions, createNumIdMintState, headingStyleId, markdownCodec, markdownContentCodec, mintListNumId, mintedListType, parseHeadingStyleId, parseListNumId, readMarkdown, readMarkdownContent, writeMarkdown, writeMarkdownContent };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MarkdownDiagnosticCodes, MarkdownInputTooLargeError, MarkdownInvalidUtf8Error, MarkdownNestingLimitExceededError, MarkdownParseError, MarkdownUnbalancedConstructMarkersError, MarkdownUnsupportedDocumentKindError, MarkdownWriteError, NOOP_MARKDOWN_DIAGNOSTIC_SINK } from "./diagnostics/diagnostics.js";
|
|
1
|
+
import { MarkdownDiagnosticCodes, MarkdownInputTooLargeError, MarkdownInvalidRunConstructExtentError, MarkdownInvalidUtf8Error, MarkdownNestingLimitExceededError, MarkdownParseError, MarkdownUnbalancedConstructMarkersError, MarkdownUnsupportedDocumentKindError, MarkdownWriteError, NOOP_MARKDOWN_DIAGNOSTIC_SINK } from "./diagnostics/diagnostics.js";
|
|
2
|
+
import { CODE_BLOCK_STYLE_ID, HORIZONTAL_RULE_STYLE_ID, HTML_PREFORMATTED_STYLE_ID, MAX_HEADING_STYLE_LEVEL, MONOSPACE_FONT_FAMILY, QUOTE_INDENT_PT, QUOTE_STYLE_ID, headingStyleId, parseHeadingStyleId } from "./shared/style-constants.js";
|
|
2
3
|
import { createNumIdMintState, mintListNumId, mintedListType, parseListNumId } from "./shared/list-id.js";
|
|
3
|
-
import { CODE_BLOCK_STYLE_ID, FOOTNOTE_REFERENCE_FONT_MARKER, HORIZONTAL_RULE_STYLE_ID, HTML_PREFORMATTED_STYLE_ID, MAX_HEADING_STYLE_LEVEL, MONOSPACE_FONT_FAMILY, QUOTE_INDENT_PT, QUOTE_STYLE_ID, headingStyleId, parseHeadingStyleId } from "./shared/style-constants.js";
|
|
4
4
|
import { readMarkdown, readMarkdownContent } from "./read.js";
|
|
5
5
|
import { writeMarkdown, writeMarkdownContent } from "./write.js";
|
|
6
6
|
import { MarkdownBytesSchema, markdownCodec, markdownContentCodec } from "./codec.js";
|
|
7
|
-
export { CODE_BLOCK_STYLE_ID,
|
|
7
|
+
export { CODE_BLOCK_STYLE_ID, HORIZONTAL_RULE_STYLE_ID, HTML_PREFORMATTED_STYLE_ID, MAX_HEADING_STYLE_LEVEL, MONOSPACE_FONT_FAMILY, MarkdownBytesSchema, MarkdownDiagnosticCodes, MarkdownInputTooLargeError, MarkdownInvalidRunConstructExtentError, MarkdownInvalidUtf8Error, MarkdownNestingLimitExceededError, MarkdownParseError, MarkdownUnbalancedConstructMarkersError, MarkdownUnsupportedDocumentKindError, MarkdownWriteError, NOOP_MARKDOWN_DIAGNOSTIC_SINK, QUOTE_INDENT_PT, QUOTE_STYLE_ID, createNumIdMintState, headingStyleId, markdownCodec, markdownContentCodec, mintListNumId, mintedListType, parseHeadingStyleId, parseListNumId, readMarkdown, readMarkdownContent, writeMarkdown, writeMarkdownContent };
|
|
@@ -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/link.d.cts
CHANGED
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/inline/link.d.ts
|
|
2
|
+
interface LinkReferenceDefinition {
|
|
3
|
+
readonly destination: string;
|
|
4
|
+
readonly title?: string;
|
|
5
|
+
}
|
|
6
|
+
type LinkReferenceMap = ReadonlyMap<string, LinkReferenceDefinition>;
|
|
7
|
+
declare function normalizeLinkLabel(labelWithBrackets: string): string;
|
|
8
|
+
declare function matchLinkLabel(text: string, start: number): number;
|
|
9
|
+
interface ParsedSpan {
|
|
10
|
+
readonly value: string;
|
|
11
|
+
readonly end: number;
|
|
12
|
+
}
|
|
13
|
+
declare function parseLinkDestination(text: string, start: number): ParsedSpan | undefined;
|
|
14
|
+
declare function parseLinkTitle(text: string, start: number): ParsedSpan | undefined;
|
|
15
|
+
declare function skipInlineWhitespace(text: string, start: number): number;
|
|
16
|
+
declare function isBlankRemainderOfLine(text: string, start: number): boolean;
|
|
17
|
+
//#endregion
|
|
2
18
|
export { LinkReferenceDefinition, LinkReferenceMap, ParsedSpan, isBlankRemainderOfLine, matchLinkLabel, normalizeLinkLabel, parseLinkDestination, parseLinkTitle, skipInlineWhitespace };
|
package/dist/inline/link.d.ts
CHANGED
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/inline/link.d.ts
|
|
2
|
+
interface LinkReferenceDefinition {
|
|
3
|
+
readonly destination: string;
|
|
4
|
+
readonly title?: string;
|
|
5
|
+
}
|
|
6
|
+
type LinkReferenceMap = ReadonlyMap<string, LinkReferenceDefinition>;
|
|
7
|
+
declare function normalizeLinkLabel(labelWithBrackets: string): string;
|
|
8
|
+
declare function matchLinkLabel(text: string, start: number): number;
|
|
9
|
+
interface ParsedSpan {
|
|
10
|
+
readonly value: string;
|
|
11
|
+
readonly end: number;
|
|
12
|
+
}
|
|
13
|
+
declare function parseLinkDestination(text: string, start: number): ParsedSpan | undefined;
|
|
14
|
+
declare function parseLinkTitle(text: string, start: number): ParsedSpan | undefined;
|
|
15
|
+
declare function skipInlineWhitespace(text: string, start: number): number;
|
|
16
|
+
declare function isBlankRemainderOfLine(text: string, start: number): boolean;
|
|
17
|
+
//#endregion
|
|
2
18
|
export { LinkReferenceDefinition, LinkReferenceMap, ParsedSpan, isBlankRemainderOfLine, matchLinkLabel, normalizeLinkLabel, parseLinkDestination, parseLinkTitle, skipInlineWhitespace };
|
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,6 +1,6 @@
|
|
|
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
|
-
import {
|
|
3
|
+
import { LinkReferenceMap } from "./inline/link.cjs";
|
|
4
4
|
//#region src/inline/inline.d.ts
|
|
5
5
|
interface InlineParseOptions {
|
|
6
6
|
readonly gfmAutolinks?: boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "./diagnostics-CjfBoW4K.cjs";
|
|
2
|
+
import { ContentRun, RunConstructExtent } from "document-schema.js";
|
|
3
|
+
//#region src/emit/inline.d.ts
|
|
4
|
+
interface InlineEmitContext {
|
|
5
|
+
readonly sink: MarkdownDiagnosticSink;
|
|
6
|
+
readonly emphasisMarker: string;
|
|
7
|
+
}
|
|
8
|
+
declare function escapeMarkdownText(text: string): string;
|
|
9
|
+
declare function escapeLinkDestination(destination: string): string;
|
|
10
|
+
declare function renderLinkTitle(title: string): string;
|
|
11
|
+
declare function emitRuns(runs: readonly ContentRun[], context: InlineEmitContext, constructs?: readonly RunConstructExtent[]): string;
|
|
12
|
+
declare function emitRunsSingleLine(runs: readonly ContentRun[], context: InlineEmitContext, constructs?: readonly RunConstructExtent[]): string;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { escapeMarkdownText as a, escapeLinkDestination as i, emitRuns as n, renderLinkTitle as o, emitRunsSingleLine as r, InlineEmitContext as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
-
import {
|
|
3
|
+
import { LinkReferenceMap } from "./inline/link.js";
|
|
4
4
|
//#region src/inline/inline.d.ts
|
|
5
5
|
interface InlineParseOptions {
|
|
6
6
|
readonly gfmAutolinks?: boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { i as MarkdownDiagnosticSink } from "./diagnostics-CjfBoW4K.js";
|
|
2
|
+
import { ContentRun, RunConstructExtent } from "document-schema.js";
|
|
3
|
+
//#region src/emit/inline.d.ts
|
|
4
|
+
interface InlineEmitContext {
|
|
5
|
+
readonly sink: MarkdownDiagnosticSink;
|
|
6
|
+
readonly emphasisMarker: string;
|
|
7
|
+
}
|
|
8
|
+
declare function escapeMarkdownText(text: string): string;
|
|
9
|
+
declare function escapeLinkDestination(destination: string): string;
|
|
10
|
+
declare function renderLinkTitle(title: string): string;
|
|
11
|
+
declare function emitRuns(runs: readonly ContentRun[], context: InlineEmitContext, constructs?: readonly RunConstructExtent[]): string;
|
|
12
|
+
declare function emitRunsSingleLine(runs: readonly ContentRun[], context: InlineEmitContext, constructs?: readonly RunConstructExtent[]): string;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { escapeMarkdownText as a, escapeLinkDestination as i, emitRuns as n, renderLinkTitle as o, emitRunsSingleLine as r, InlineEmitContext as t };
|
|
@@ -1,10 +1,60 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_diagnostics_diagnostics = require("../diagnostics/diagnostics.cjs");
|
|
3
|
+
const require_shared_line_ending = require("../shared/line-ending.cjs");
|
|
3
4
|
//#region src/lower/front-matter.ts
|
|
4
5
|
const LEADING_DELIMITER_PATTERN = /^---[ \t]*$/;
|
|
5
6
|
const CLOSING_DELIMITER_PATTERN = /^(?:---|\.\.\.)[ \t]*$/;
|
|
6
7
|
const KEY_VALUE_LINE_PATTERN = /^([A-Za-z_][A-Za-z0-9_-]*):[ \t]*(.*)$/;
|
|
7
|
-
const
|
|
8
|
+
const STRING_FIELD_SETTERS = {
|
|
9
|
+
title: (metadata, value) => {
|
|
10
|
+
metadata.title = value;
|
|
11
|
+
},
|
|
12
|
+
author: (metadata, value) => {
|
|
13
|
+
metadata.author = value;
|
|
14
|
+
},
|
|
15
|
+
subject: (metadata, value) => {
|
|
16
|
+
metadata.subject = value;
|
|
17
|
+
},
|
|
18
|
+
creator: (metadata, value) => {
|
|
19
|
+
metadata.creator = value;
|
|
20
|
+
},
|
|
21
|
+
date: (metadata, value) => {
|
|
22
|
+
metadata.createdIso = value;
|
|
23
|
+
},
|
|
24
|
+
modified: (metadata, value) => {
|
|
25
|
+
metadata.modifiedIso = value;
|
|
26
|
+
},
|
|
27
|
+
lastPrinted: (metadata, value) => {
|
|
28
|
+
metadata.lastPrintedIso = value;
|
|
29
|
+
},
|
|
30
|
+
language: (metadata, value) => {
|
|
31
|
+
metadata.language = value;
|
|
32
|
+
},
|
|
33
|
+
publisher: (metadata, value) => {
|
|
34
|
+
metadata.publisher = value;
|
|
35
|
+
},
|
|
36
|
+
contributor: (metadata, value) => {
|
|
37
|
+
metadata.contributor = value;
|
|
38
|
+
},
|
|
39
|
+
rights: (metadata, value) => {
|
|
40
|
+
metadata.rights = value;
|
|
41
|
+
},
|
|
42
|
+
identifier: (metadata, value) => {
|
|
43
|
+
metadata.identifier = value;
|
|
44
|
+
},
|
|
45
|
+
comments: (metadata, value) => {
|
|
46
|
+
metadata.comments = value;
|
|
47
|
+
},
|
|
48
|
+
company: (metadata, value) => {
|
|
49
|
+
metadata.company = value;
|
|
50
|
+
},
|
|
51
|
+
manager: (metadata, value) => {
|
|
52
|
+
metadata.manager = value;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
function isTextDirection(value) {
|
|
56
|
+
return value === "ltr" || value === "rtl";
|
|
57
|
+
}
|
|
8
58
|
function parseScalar(raw) {
|
|
9
59
|
const trimmed = raw.trim();
|
|
10
60
|
const isDoubleQuoted = trimmed.length >= 2 && trimmed.startsWith("\"") && trimmed.endsWith("\"");
|
|
@@ -16,11 +66,12 @@ function parseKeywordList(raw) {
|
|
|
16
66
|
return (trimmed.startsWith("[") && trimmed.endsWith("]") ? trimmed.slice(1, -1) : trimmed).split(",").map((item) => parseScalar(item)).filter((item) => item.length > 0);
|
|
17
67
|
}
|
|
18
68
|
function extractFrontMatter(source, sink = require_diagnostics_diagnostics.NOOP_MARKDOWN_DIAGNOSTIC_SINK) {
|
|
19
|
-
const lines = source.split(LINE_ENDING_PATTERN);
|
|
69
|
+
const lines = source.split(require_shared_line_ending.LINE_ENDING_PATTERN);
|
|
20
70
|
const firstLine = lines[0];
|
|
21
71
|
if (firstLine === void 0 || !LEADING_DELIMITER_PATTERN.test(firstLine)) return {
|
|
22
72
|
metadata: {},
|
|
23
|
-
rest: source
|
|
73
|
+
rest: source,
|
|
74
|
+
source: void 0
|
|
24
75
|
};
|
|
25
76
|
let closingIndex = -1;
|
|
26
77
|
for (let index = 1; index < lines.length; index += 1) if (CLOSING_DELIMITER_PATTERN.test(lines[index] ?? "")) {
|
|
@@ -29,7 +80,8 @@ function extractFrontMatter(source, sink = require_diagnostics_diagnostics.NOOP_
|
|
|
29
80
|
}
|
|
30
81
|
if (closingIndex === -1) return {
|
|
31
82
|
metadata: {},
|
|
32
|
-
rest: source
|
|
83
|
+
rest: source,
|
|
84
|
+
source: void 0
|
|
33
85
|
};
|
|
34
86
|
const metadata = {};
|
|
35
87
|
for (let index = 1; index < closingIndex; index += 1) {
|
|
@@ -39,36 +91,31 @@ function extractFrontMatter(source, sink = require_diagnostics_diagnostics.NOOP_
|
|
|
39
91
|
const key = match?.[1];
|
|
40
92
|
const value = match?.[2];
|
|
41
93
|
if (key === void 0 || value === void 0) continue;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
break;
|
|
55
|
-
case "date":
|
|
56
|
-
metadata.createdIso = parseScalar(value);
|
|
57
|
-
break;
|
|
58
|
-
case "keywords":
|
|
59
|
-
metadata.keywords = [...parseKeywordList(value)];
|
|
60
|
-
break;
|
|
61
|
-
default: sink({
|
|
94
|
+
if (key === "keywords") {
|
|
95
|
+
metadata.keywords = [...parseKeywordList(value)];
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
if (key === "direction") {
|
|
99
|
+
const scalar = parseScalar(value);
|
|
100
|
+
if (isTextDirection(scalar)) metadata.direction = scalar;
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
const setter = STRING_FIELD_SETTERS[key];
|
|
104
|
+
if (setter === void 0) {
|
|
105
|
+
sink({
|
|
62
106
|
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.FRONT_MATTER_KEY_UNMAPPED,
|
|
63
107
|
severity: "info",
|
|
64
|
-
message: `front matter key "${key}" has no LayoutMetadata equivalent and was dropped`,
|
|
108
|
+
message: `front matter key "${key}" has no LayoutMetadata equivalent and was dropped from the metadata; its original spelling survives in the verbatim front-matter block this package's own writer can re-emit`,
|
|
65
109
|
line: index + 1
|
|
66
110
|
});
|
|
111
|
+
continue;
|
|
67
112
|
}
|
|
113
|
+
setter(metadata, parseScalar(value));
|
|
68
114
|
}
|
|
69
115
|
return {
|
|
70
116
|
metadata,
|
|
71
|
-
rest: lines.slice(closingIndex + 1).join("\n")
|
|
117
|
+
rest: lines.slice(closingIndex + 1).join("\n"),
|
|
118
|
+
source: lines.slice(0, closingIndex + 1).join("\n")
|
|
72
119
|
};
|
|
73
120
|
}
|
|
74
121
|
//#endregion
|
|
@@ -1,9 +1,10 @@
|
|
|
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 {
|
|
5
5
|
readonly metadata: LayoutMetadata;
|
|
6
6
|
readonly rest: string;
|
|
7
|
+
readonly source: string | undefined;
|
|
7
8
|
}
|
|
8
9
|
declare function extractFrontMatter(source: string, sink?: MarkdownDiagnosticSink): FrontMatterResult;
|
|
9
10
|
//#endregion
|
|
@@ -1,9 +1,10 @@
|
|
|
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 {
|
|
5
5
|
readonly metadata: LayoutMetadata;
|
|
6
6
|
readonly rest: string;
|
|
7
|
+
readonly source: string | undefined;
|
|
7
8
|
}
|
|
8
9
|
declare function extractFrontMatter(source: string, sink?: MarkdownDiagnosticSink): FrontMatterResult;
|
|
9
10
|
//#endregion
|
|
@@ -1,9 +1,59 @@
|
|
|
1
1
|
import { MarkdownDiagnosticCodes, NOOP_MARKDOWN_DIAGNOSTIC_SINK } from "../diagnostics/diagnostics.js";
|
|
2
|
+
import { LINE_ENDING_PATTERN } from "../shared/line-ending.js";
|
|
2
3
|
//#region src/lower/front-matter.ts
|
|
3
4
|
const LEADING_DELIMITER_PATTERN = /^---[ \t]*$/;
|
|
4
5
|
const CLOSING_DELIMITER_PATTERN = /^(?:---|\.\.\.)[ \t]*$/;
|
|
5
6
|
const KEY_VALUE_LINE_PATTERN = /^([A-Za-z_][A-Za-z0-9_-]*):[ \t]*(.*)$/;
|
|
6
|
-
const
|
|
7
|
+
const STRING_FIELD_SETTERS = {
|
|
8
|
+
title: (metadata, value) => {
|
|
9
|
+
metadata.title = value;
|
|
10
|
+
},
|
|
11
|
+
author: (metadata, value) => {
|
|
12
|
+
metadata.author = value;
|
|
13
|
+
},
|
|
14
|
+
subject: (metadata, value) => {
|
|
15
|
+
metadata.subject = value;
|
|
16
|
+
},
|
|
17
|
+
creator: (metadata, value) => {
|
|
18
|
+
metadata.creator = value;
|
|
19
|
+
},
|
|
20
|
+
date: (metadata, value) => {
|
|
21
|
+
metadata.createdIso = value;
|
|
22
|
+
},
|
|
23
|
+
modified: (metadata, value) => {
|
|
24
|
+
metadata.modifiedIso = value;
|
|
25
|
+
},
|
|
26
|
+
lastPrinted: (metadata, value) => {
|
|
27
|
+
metadata.lastPrintedIso = value;
|
|
28
|
+
},
|
|
29
|
+
language: (metadata, value) => {
|
|
30
|
+
metadata.language = value;
|
|
31
|
+
},
|
|
32
|
+
publisher: (metadata, value) => {
|
|
33
|
+
metadata.publisher = value;
|
|
34
|
+
},
|
|
35
|
+
contributor: (metadata, value) => {
|
|
36
|
+
metadata.contributor = value;
|
|
37
|
+
},
|
|
38
|
+
rights: (metadata, value) => {
|
|
39
|
+
metadata.rights = value;
|
|
40
|
+
},
|
|
41
|
+
identifier: (metadata, value) => {
|
|
42
|
+
metadata.identifier = value;
|
|
43
|
+
},
|
|
44
|
+
comments: (metadata, value) => {
|
|
45
|
+
metadata.comments = value;
|
|
46
|
+
},
|
|
47
|
+
company: (metadata, value) => {
|
|
48
|
+
metadata.company = value;
|
|
49
|
+
},
|
|
50
|
+
manager: (metadata, value) => {
|
|
51
|
+
metadata.manager = value;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
function isTextDirection(value) {
|
|
55
|
+
return value === "ltr" || value === "rtl";
|
|
56
|
+
}
|
|
7
57
|
function parseScalar(raw) {
|
|
8
58
|
const trimmed = raw.trim();
|
|
9
59
|
const isDoubleQuoted = trimmed.length >= 2 && trimmed.startsWith("\"") && trimmed.endsWith("\"");
|
|
@@ -19,7 +69,8 @@ function extractFrontMatter(source, sink = NOOP_MARKDOWN_DIAGNOSTIC_SINK) {
|
|
|
19
69
|
const firstLine = lines[0];
|
|
20
70
|
if (firstLine === void 0 || !LEADING_DELIMITER_PATTERN.test(firstLine)) return {
|
|
21
71
|
metadata: {},
|
|
22
|
-
rest: source
|
|
72
|
+
rest: source,
|
|
73
|
+
source: void 0
|
|
23
74
|
};
|
|
24
75
|
let closingIndex = -1;
|
|
25
76
|
for (let index = 1; index < lines.length; index += 1) if (CLOSING_DELIMITER_PATTERN.test(lines[index] ?? "")) {
|
|
@@ -28,7 +79,8 @@ function extractFrontMatter(source, sink = NOOP_MARKDOWN_DIAGNOSTIC_SINK) {
|
|
|
28
79
|
}
|
|
29
80
|
if (closingIndex === -1) return {
|
|
30
81
|
metadata: {},
|
|
31
|
-
rest: source
|
|
82
|
+
rest: source,
|
|
83
|
+
source: void 0
|
|
32
84
|
};
|
|
33
85
|
const metadata = {};
|
|
34
86
|
for (let index = 1; index < closingIndex; index += 1) {
|
|
@@ -38,36 +90,31 @@ function extractFrontMatter(source, sink = NOOP_MARKDOWN_DIAGNOSTIC_SINK) {
|
|
|
38
90
|
const key = match?.[1];
|
|
39
91
|
const value = match?.[2];
|
|
40
92
|
if (key === void 0 || value === void 0) continue;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
break;
|
|
54
|
-
case "date":
|
|
55
|
-
metadata.createdIso = parseScalar(value);
|
|
56
|
-
break;
|
|
57
|
-
case "keywords":
|
|
58
|
-
metadata.keywords = [...parseKeywordList(value)];
|
|
59
|
-
break;
|
|
60
|
-
default: sink({
|
|
93
|
+
if (key === "keywords") {
|
|
94
|
+
metadata.keywords = [...parseKeywordList(value)];
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
if (key === "direction") {
|
|
98
|
+
const scalar = parseScalar(value);
|
|
99
|
+
if (isTextDirection(scalar)) metadata.direction = scalar;
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
const setter = STRING_FIELD_SETTERS[key];
|
|
103
|
+
if (setter === void 0) {
|
|
104
|
+
sink({
|
|
61
105
|
code: MarkdownDiagnosticCodes.FRONT_MATTER_KEY_UNMAPPED,
|
|
62
106
|
severity: "info",
|
|
63
|
-
message: `front matter key "${key}" has no LayoutMetadata equivalent and was dropped`,
|
|
107
|
+
message: `front matter key "${key}" has no LayoutMetadata equivalent and was dropped from the metadata; its original spelling survives in the verbatim front-matter block this package's own writer can re-emit`,
|
|
64
108
|
line: index + 1
|
|
65
109
|
});
|
|
110
|
+
continue;
|
|
66
111
|
}
|
|
112
|
+
setter(metadata, parseScalar(value));
|
|
67
113
|
}
|
|
68
114
|
return {
|
|
69
115
|
metadata,
|
|
70
|
-
rest: lines.slice(closingIndex + 1).join("\n")
|
|
116
|
+
rest: lines.slice(closingIndex + 1).join("\n"),
|
|
117
|
+
source: lines.slice(0, closingIndex + 1).join("\n")
|
|
71
118
|
};
|
|
72
119
|
}
|
|
73
120
|
//#endregion
|
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 };
|