@effected/markdown 0.19.0 → 0.20.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.
Files changed (65) hide show
  1. package/Frontmatter.js +1 -2
  2. package/FrontmatterResolver.js +1 -2
  3. package/FrontmatterSource.js +1 -2
  4. package/JsonFrontmatter.js +1 -2
  5. package/Markdown.js +1 -2
  6. package/MarkdownDiagnostic.js +1 -2
  7. package/MarkdownDocument.js +1 -2
  8. package/MarkdownEdit.js +1 -2
  9. package/MarkdownFormat.js +1 -2
  10. package/MarkdownNode.js +1 -2
  11. package/MarkdownTransform.js +1 -2
  12. package/MarkdownVisitor.js +1 -2
  13. package/Mdast.js +1 -2
  14. package/TomlFrontmatter.js +1 -2
  15. package/YamlFrontmatter.js +1 -2
  16. package/index.d.ts +0 -30
  17. package/internal/blockParser.js +1 -2
  18. package/internal/blockRegistry.js +1 -2
  19. package/internal/blockTypes.js +1 -2
  20. package/internal/blocks/atxHeading.js +1 -2
  21. package/internal/blocks/blockquote.js +1 -2
  22. package/internal/blocks/code.js +1 -2
  23. package/internal/blocks/document.js +1 -2
  24. package/internal/blocks/fencedCode.js +1 -2
  25. package/internal/blocks/footnoteDefinition.js +1 -2
  26. package/internal/blocks/frontmatter.js +1 -2
  27. package/internal/blocks/htmlBlock.js +1 -2
  28. package/internal/blocks/indentedCode.js +1 -2
  29. package/internal/blocks/linkReferenceDefinition.js +1 -2
  30. package/internal/blocks/list.js +1 -2
  31. package/internal/blocks/paragraph.js +1 -2
  32. package/internal/blocks/setextHeading.js +1 -2
  33. package/internal/blocks/table.js +1 -2
  34. package/internal/blocks/taskListItem.js +1 -2
  35. package/internal/blocks/thematicBreak.js +1 -2
  36. package/internal/carriers.js +1 -2
  37. package/internal/entities.js +1 -2
  38. package/internal/entityMap.js +1 -2
  39. package/internal/htmlTags.js +1 -2
  40. package/internal/inlineNode.js +1 -2
  41. package/internal/inlineParser.js +1 -2
  42. package/internal/inlineRegistry.js +1 -2
  43. package/internal/inlines/autolink.js +1 -2
  44. package/internal/inlines/autolinkLiteral.js +1 -2
  45. package/internal/inlines/codeSpan.js +1 -2
  46. package/internal/inlines/emphasis.js +1 -2
  47. package/internal/inlines/entity.js +1 -2
  48. package/internal/inlines/escape.js +1 -2
  49. package/internal/inlines/footnoteReference.js +1 -2
  50. package/internal/inlines/lineBreak.js +1 -2
  51. package/internal/inlines/link.js +1 -2
  52. package/internal/inlines/rawHtml.js +1 -2
  53. package/internal/inlines/strikethrough.js +1 -2
  54. package/internal/inlines/text.js +1 -2
  55. package/internal/lineIndex.js +1 -2
  56. package/internal/patterns.js +1 -2
  57. package/internal/phrasing.js +1 -2
  58. package/internal/preprocess.js +1 -2
  59. package/internal/rawInline.js +1 -2
  60. package/internal/references.js +1 -2
  61. package/internal/sectionBounds.js +1 -2
  62. package/internal/segments.js +1 -2
  63. package/internal/stringify.js +1 -2
  64. package/internal/unescape.js +1 -2
  65. package/package.json +4 -4
package/Frontmatter.js CHANGED
@@ -2,7 +2,7 @@ import { MarkdownEdit } from "./MarkdownEdit.js";
2
2
  import { FrontmatterFormat } from "./MarkdownNode.js";
3
3
  import { Effect, Schema } from "effect";
4
4
 
5
- //#region src/Frontmatter.ts
5
+ // src/Frontmatter.ts
6
6
  /**
7
7
  * Indicates that a frontmatter codec was handed a capture of a different
8
8
  * format — a yaml codec applied to a `+++` toml capture, for example.
@@ -303,5 +303,4 @@ var MarkdownFrontmatter = class MarkdownFrontmatter {
303
303
  }
304
304
  };
305
305
 
306
- //#endregion
307
306
  export { FrontmatterDecodeError, FrontmatterEncodeError, FrontmatterFormatMismatchError, FrontmatterMissingError, FrontmatterMissingReason, FrontmatterValidationError, MarkdownFrontmatter };
@@ -1,6 +1,6 @@
1
1
  import { Effect, Result, Schema } from "effect";
2
2
 
3
- //#region src/FrontmatterResolver.ts
3
+ // src/FrontmatterResolver.ts
4
4
  /**
5
5
  * A `$schema` declaration referencing a schema by URL — any string containing
6
6
  * `://`.
@@ -267,5 +267,4 @@ var SchemaResolver = class SchemaResolver {
267
267
  }
268
268
  };
269
269
 
270
- //#endregion
271
270
  export { SchemaDeclaration, SchemaDeclarationByName, SchemaDeclarationByPath, SchemaDeclarationByUrl, SchemaDeclarationInline, SchemaDeclarationInvalidError, SchemaDeclarationMissingError, SchemaNameUnknownError, SchemaResolver, SchemaVersionUnresolvableError };
@@ -2,7 +2,7 @@ import { FrontmatterFormat } from "./MarkdownNode.js";
2
2
  import { scanRawFrontmatter } from "./internal/blocks/frontmatter.js";
3
3
  import { Effect, Schema } from "effect";
4
4
 
5
- //#region src/FrontmatterSource.ts
5
+ // src/FrontmatterSource.ts
6
6
  /**
7
7
  * The three line-terminator spellings a fence line may end with. Recorded by
8
8
  * {@link FrontmatterSource.split} as fidelity — what the source's fence
@@ -169,5 +169,4 @@ var FrontmatterSource = class {
169
169
  }
170
170
  };
171
171
 
172
- //#endregion
173
172
  export { FrontmatterNewline, FrontmatterSource, FrontmatterSourceBlock, FrontmatterSourceSplit };
@@ -2,7 +2,7 @@ import { FrontmatterDecodeError, FrontmatterEncodeError, FrontmatterFormatMismat
2
2
  import { Effect } from "effect";
3
3
  import { Jsonc } from "@effected/jsonc";
4
4
 
5
- //#region src/JsonFrontmatter.ts
5
+ // src/JsonFrontmatter.ts
6
6
  /**
7
7
  * The json frontmatter codec, over `@effected/jsonc`.
8
8
  *
@@ -42,5 +42,4 @@ const JsonFrontmatter = {
42
42
  })))
43
43
  };
44
44
 
45
- //#endregion
46
45
  export { JsonFrontmatter };
package/Markdown.js CHANGED
@@ -6,7 +6,7 @@ import { stringifyBlocks } from "./internal/stringify.js";
6
6
  import { MarkdownDiagnostic } from "./MarkdownDiagnostic.js";
7
7
  import { Effect, Result, Schema, SchemaIssue, SchemaTransformation } from "effect";
8
8
 
9
- //#region src/Markdown.ts
9
+ // src/Markdown.ts
10
10
  /**
11
11
  * The markdown dialects the parser can be pointed at. `"gfm"` — CommonMark
12
12
  * 0.31.2 plus the GitHub extensions (tables, strikethrough, autolink
@@ -426,5 +426,4 @@ var Markdown = class Markdown {
426
426
  static MarkdownFromString = Markdown.fromString();
427
427
  };
428
428
 
429
- //#endregion
430
429
  export { Markdown, MarkdownDialect, MarkdownParseError, MarkdownParseOptions, MarkdownStringifyError, parsePassResult };
@@ -1,7 +1,7 @@
1
1
  import { MARKDOWN_PARSE_ERROR_CODES } from "./internal/carriers.js";
2
2
  import { Schema } from "effect";
3
3
 
4
- //#region src/MarkdownDiagnostic.ts
4
+ // src/MarkdownDiagnostic.ts
5
5
  /**
6
6
  * Error codes `Markdown.parse`/`MarkdownDocument.parse` can fail with.
7
7
  * Currently exactly one, `"NestingDepthExceeded"`, the hardening-guard trip;
@@ -84,5 +84,4 @@ function lineChar(text, offset) {
84
84
  };
85
85
  }
86
86
 
87
- //#endregion
88
87
  export { MarkdownDiagnostic, MarkdownParseErrorCode };
@@ -8,7 +8,7 @@ import { parsePassResult } from "./Markdown.js";
8
8
  import { rootHeadingBounds } from "./internal/sectionBounds.js";
9
9
  import { Effect, Result, Schema } from "effect";
10
10
 
11
- //#region src/MarkdownDocument.ts
11
+ // src/MarkdownDocument.ts
12
12
  /**
13
13
  * A heading-delimited span from {@link MarkdownDocument.sections}: the
14
14
  * heading, its depth, the source `range` the section occupies and the
@@ -391,5 +391,4 @@ var MarkdownDocument = class MarkdownDocument extends Schema.Class("MarkdownDocu
391
391
  static parse = Effect.fn("MarkdownDocument.parse")((text, options) => Effect.fromResult(MarkdownDocument.parseResult(text, options)));
392
392
  };
393
393
 
394
- //#endregion
395
394
  export { DocumentSection, MarkdownDocument };
package/MarkdownEdit.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
 
3
- //#region src/MarkdownEdit.ts
3
+ // src/MarkdownEdit.ts
4
4
  /**
5
5
  * A range within a markdown document, expressed as a zero-based character
6
6
  * `offset` and a `length` in UTF-16 code units. Pass to `MarkdownFormat.format`
@@ -52,5 +52,4 @@ var MarkdownEdit = class extends Schema.Class("MarkdownEdit")({
52
52
  }
53
53
  };
54
54
 
55
- //#endregion
56
55
  export { MarkdownEdit, MarkdownRange };
package/MarkdownFormat.js CHANGED
@@ -3,7 +3,7 @@ import { BulletChar, EmphasisChar, FenceChar, HeadingStyle, Paragraph, Root, Tex
3
3
  import { Markdown, MarkdownDialect, MarkdownParseOptions } from "./Markdown.js";
4
4
  import { Effect, Result, Schema } from "effect";
5
5
 
6
- //#region src/MarkdownFormat.ts
6
+ // src/MarkdownFormat.ts
7
7
  /**
8
8
  * The two ways CommonMark spells a code block: `fenced` (a backtick or tilde
9
9
  * fence) and `indented` (four-space indentation).
@@ -511,5 +511,4 @@ var MarkdownFormat = class MarkdownFormat {
511
511
  });
512
512
  };
513
513
 
514
- //#endregion
515
514
  export { CodeBlockStyle, MarkdownFormat, MarkdownFormattingOptions, MarkdownModificationError, MarkdownModificationErrorCode };
package/MarkdownNode.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Effect, Schema } from "effect";
2
2
 
3
- //#region src/MarkdownNode.ts
3
+ // src/MarkdownNode.ts
4
4
  /**
5
5
  * A single point in a source document: 1-based `line` and `column`, 0-based
6
6
  * `offset`.
@@ -854,5 +854,4 @@ const MarkdownNode = Schema.suspend(() => Schema.Union([
854
854
  TableContent
855
855
  ]));
856
856
 
857
- //#endregion
858
857
  export { Blockquote, Break, BreakStyle, BulletChar, Code, Definition, Delete, Emphasis, EmphasisChar, FenceChar, FlowContent, FootnoteDefinition, FootnoteReference, Frontmatter, FrontmatterContent, FrontmatterFormat, Heading, HeadingDepth, HeadingStyle, Html, Image, ImageReference, InlineCode, Link, LinkReference, List, ListContent, ListDelimiter, ListItem, MarkdownNode, MdxFlowExpression, MdxJsxAttribute, MdxJsxAttributeContent, MdxJsxAttributeValueExpression, MdxJsxExpressionAttribute, MdxJsxFlowElement, MdxJsxTextElement, MdxTextExpression, MdxjsEsm, Paragraph, PhrasingContent, Point, Position, ReferenceType, Root, RowContent, Strong, Table, TableAlign, TableCell, TableContent, TableRow, Text, ThematicBreak, ThematicBreakChar };
@@ -1,6 +1,6 @@
1
1
  import { rootHeadingBounds } from "./internal/sectionBounds.js";
2
2
 
3
- //#region src/MarkdownTransform.ts
3
+ // src/MarkdownTransform.ts
4
4
  /**
5
5
  * Pure, total tree-to-tree transforms over the markdown node classes. Not
6
6
  * instantiable.
@@ -163,5 +163,4 @@ function mapNode(node, handlers) {
163
163
  return handler === void 0 ? current : handler(current);
164
164
  }
165
165
 
166
- //#endregion
167
166
  export { MarkdownTransform };
@@ -1,7 +1,7 @@
1
1
  import { MarkdownDiagnostic } from "./MarkdownDiagnostic.js";
2
2
  import { Data, Stream } from "effect";
3
3
 
4
- //#region src/MarkdownVisitor.ts
4
+ // src/MarkdownVisitor.ts
5
5
  /**
6
6
  * Constructors and matchers for the `MarkdownVisitorEvent` union (e.g.
7
7
  * `MarkdownVisitorEvent.Enter({ node, path, depth })`,
@@ -105,5 +105,4 @@ function* walkNode(node, path, depth) {
105
105
  });
106
106
  }
107
107
 
108
- //#endregion
109
108
  export { MarkdownVisitor, MarkdownVisitorEvent };
package/Mdast.js CHANGED
@@ -2,7 +2,7 @@ import { Root } from "./MarkdownNode.js";
2
2
  import { unescapeString } from "./internal/unescape.js";
3
3
  import { Effect, Result, Schema } from "effect";
4
4
 
5
- //#region src/Mdast.ts
5
+ // src/Mdast.ts
6
6
  /**
7
7
  * Indicates that foreign mdast input failed to decode into the package's
8
8
  * node classes.
@@ -520,5 +520,4 @@ function nodeText(node, includeImageAlt, includeHtml) {
520
520
  return "";
521
521
  }
522
522
 
523
- //#endregion
524
523
  export { Mdast, MdastDecodeError };
@@ -2,7 +2,7 @@ import { FrontmatterDecodeError, FrontmatterEncodeError, FrontmatterFormatMismat
2
2
  import { Effect } from "effect";
3
3
  import { Toml } from "@effected/toml";
4
4
 
5
- //#region src/TomlFrontmatter.ts
5
+ // src/TomlFrontmatter.ts
6
6
  /**
7
7
  * The toml frontmatter codec, over `@effected/toml`.
8
8
  *
@@ -40,5 +40,4 @@ const TomlFrontmatter = {
40
40
  })))
41
41
  };
42
42
 
43
- //#endregion
44
43
  export { TomlFrontmatter };
@@ -2,7 +2,7 @@ import { FrontmatterDecodeError, FrontmatterEncodeError, FrontmatterFormatMismat
2
2
  import { Effect } from "effect";
3
3
  import { Yaml } from "@effected/yaml";
4
4
 
5
- //#region src/YamlFrontmatter.ts
5
+ // src/YamlFrontmatter.ts
6
6
  /**
7
7
  * The yaml frontmatter codec, over `@effected/yaml`.
8
8
  *
@@ -41,5 +41,4 @@ const YamlFrontmatter = {
41
41
  })))
42
42
  };
43
43
 
44
- //#endregion
45
44
  export { YamlFrontmatter };
package/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Data, Effect, Result, Schema, Stream } from "effect";
2
- //#region src/MarkdownNode.d.ts
3
2
  declare const Point_base: Schema.Class<Point, Schema.Struct<{
4
3
  readonly line: Schema.Number;
5
4
  readonly column: Schema.Number;
@@ -941,8 +940,6 @@ type MarkdownNodeType = MarkdownNode["type"];
941
940
  type MarkdownNodeOfType<T extends MarkdownNodeType> = Extract<MarkdownNode, {
942
941
  readonly type: T;
943
942
  }>;
944
- //#endregion
945
- //#region src/MarkdownDiagnostic.d.ts
946
943
  /**
947
944
  * Error codes `Markdown.parse`/`MarkdownDocument.parse` can fail with.
948
945
  * Currently exactly one, `"NestingDepthExceeded"`, the hardening-guard trip;
@@ -999,8 +996,6 @@ export declare class MarkdownDiagnostic extends MarkdownDiagnostic_base {
999
996
  readonly length: number;
1000
997
  }): MarkdownDiagnostic;
1001
998
  }
1002
- //#endregion
1003
- //#region src/Markdown.d.ts
1004
999
  /**
1005
1000
  * The markdown dialects the parser can be pointed at. `"gfm"` — CommonMark
1006
1001
  * 0.31.2 plus the GitHub extensions (tables, strikethrough, autolink
@@ -1354,8 +1349,6 @@ export declare class Markdown {
1354
1349
  */
1355
1350
  static readonly MarkdownFromString: Schema.Codec<Root, string>;
1356
1351
  }
1357
- //#endregion
1358
- //#region src/MarkdownEdit.d.ts
1359
1352
  /**
1360
1353
  * A single path segment: a `number` for child indices in the node tree, or a
1361
1354
  * `string` for named addressing (reserved, e.g. for definition identifiers).
@@ -1412,8 +1405,6 @@ export declare class MarkdownEdit extends MarkdownEdit_base {
1412
1405
  */
1413
1406
  static applyAll(text: string, edits: ReadonlyArray<MarkdownEdit>): string;
1414
1407
  }
1415
- //#endregion
1416
- //#region src/MarkdownDocument.d.ts
1417
1408
  /**
1418
1409
  * A heading entry from {@link MarkdownDocument.headings}: the {@link Heading}
1419
1410
  * node plus the derivations navigation wants — its `depth` and its plain-text
@@ -1767,8 +1758,6 @@ export declare class MarkdownDocument extends MarkdownDocument_base {
1767
1758
  */
1768
1759
  static readonly parse: (text: string, options?: MarkdownParseOptions | undefined) => Effect.Effect<MarkdownDocument, MarkdownParseError, never>;
1769
1760
  }
1770
- //#endregion
1771
- //#region src/Frontmatter.d.ts
1772
1761
  declare const FrontmatterFormatMismatchError_base: Schema.Class<FrontmatterFormatMismatchError, Schema.TaggedStruct<"FrontmatterFormatMismatchError", {
1773
1762
  /** The format the codec decodes. */
1774
1763
  readonly expected: Schema.Literals<readonly ["yaml", "toml", "json"]>;
@@ -2061,8 +2050,6 @@ export declare class MarkdownFrontmatter {
2061
2050
  */
2062
2051
  static setToString<T, E, RD = never, RE = never>(schema: Schema.Codec<T, E, RD, RE>, codec: FrontmatterCodec): (document: MarkdownDocument, data: T) => Effect.Effect<string, FrontmatterWriteError, RE>;
2063
2052
  }
2064
- //#endregion
2065
- //#region src/FrontmatterResolver.d.ts
2066
2053
  declare const SchemaDeclarationByUrl_base: Schema.Class<SchemaDeclarationByUrl, Schema.TaggedStruct<"ByUrl", {
2067
2054
  /** The URL as written in the declaration. */
2068
2055
  readonly url: Schema.String;
@@ -2292,8 +2279,6 @@ export declare class SchemaResolver {
2292
2279
  */
2293
2280
  static fromRegistry(registrations: Readonly<Record<string, Schema.Top>>): FrontmatterSchemaResolver;
2294
2281
  }
2295
- //#endregion
2296
- //#region src/FrontmatterSource.d.ts
2297
2282
  /**
2298
2283
  * The three line-terminator spellings a fence line may end with. Recorded by
2299
2284
  * {@link FrontmatterSource.split} as fidelity — what the source's fence
@@ -2430,8 +2415,6 @@ export declare class FrontmatterSource {
2430
2415
  */
2431
2416
  static join(split: FrontmatterSourceSplit): string;
2432
2417
  }
2433
- //#endregion
2434
- //#region src/JsonFrontmatter.d.ts
2435
2418
  /**
2436
2419
  * The json frontmatter codec, over `@effected/jsonc`.
2437
2420
  *
@@ -2457,8 +2440,6 @@ export declare class FrontmatterSource {
2457
2440
  * @public
2458
2441
  */
2459
2442
  export declare const JsonFrontmatter: FrontmatterCodec;
2460
- //#endregion
2461
- //#region src/MarkdownFormat.d.ts
2462
2443
  /**
2463
2444
  * A range accepted at the `format`/`formatToString` call sites: either a
2464
2445
  * {@link MarkdownRange} instance or a plain `{ offset, length }` literal (the
@@ -2672,8 +2653,6 @@ export declare class MarkdownFormat {
2672
2653
  */
2673
2654
  static readonly modifyToString: (document: MarkdownDocument, target: MarkdownNode, replacement: string | MarkdownNode) => Effect.Effect<string, MarkdownModificationError, never>;
2674
2655
  }
2675
- //#endregion
2676
- //#region src/MarkdownTransform.d.ts
2677
2656
  /**
2678
2657
  * The node `type` tags whose handler may change the node's type — the
2679
2658
  * phrasing-only types, i.e. every member of `PhrasingContent` that is
@@ -2917,8 +2896,6 @@ export declare class MarkdownTransform {
2917
2896
  */
2918
2897
  static sections(root: Root, options: SectionSpanOptions): ReadonlyArray<SectionSpan>;
2919
2898
  }
2920
- //#endregion
2921
- //#region src/MarkdownVisitor.d.ts
2922
2899
  /**
2923
2900
  * The discriminated union of markdown visitor events, in document pre-order.
2924
2901
  * `Enter` fires when the walk reaches a node, `Exit` when it leaves — for a
@@ -3113,8 +3090,6 @@ export declare class MarkdownVisitor {
3113
3090
  */
3114
3091
  static visit(root: Root): Stream.Stream<MarkdownVisitorEvent>;
3115
3092
  }
3116
- //#endregion
3117
- //#region src/Mdast.d.ts
3118
3093
  /**
3119
3094
  * A plain mdast node: a `type` tag plus whatever fields that type carries.
3120
3095
  *
@@ -3295,8 +3270,6 @@ export declare class Mdast {
3295
3270
  */
3296
3271
  static toText(node: MarkdownNode, options?: MdastToTextOptions): string;
3297
3272
  }
3298
- //#endregion
3299
- //#region src/TomlFrontmatter.d.ts
3300
3273
  /**
3301
3274
  * The toml frontmatter codec, over `@effected/toml`.
3302
3275
  *
@@ -3320,8 +3293,6 @@ export declare class Mdast {
3320
3293
  * @public
3321
3294
  */
3322
3295
  export declare const TomlFrontmatter: FrontmatterCodec;
3323
- //#endregion
3324
- //#region src/YamlFrontmatter.d.ts
3325
3296
  /**
3326
3297
  * The yaml frontmatter codec, over `@effected/yaml`.
3327
3298
  *
@@ -3346,6 +3317,5 @@ export declare const TomlFrontmatter: FrontmatterCodec;
3346
3317
  * @public
3347
3318
  */
3348
3319
  export declare const YamlFrontmatter: FrontmatterCodec;
3349
- //#endregion
3350
3320
  export type { DocumentHeading, DocumentLink, FrontmatterCodec, FrontmatterResolveError, FrontmatterSchemaError, FrontmatterSchemaResolver, FrontmatterWriteError, LinkBearingNode, MarkdownNodeOfType, MarkdownNodeType, MarkdownPath, MarkdownPhrasingOnlyType, MarkdownRangeLike, MarkdownSegment, MarkdownTransformHandlers, MarkdownTransformResult, MdastNode, MdastToTextOptions, SectionHeadingMatch, SectionQueryOptions, SectionSpan, SectionSpanOptions, ShiftHeadingsOptions };
3351
3321
  //# sourceMappingURL=index.d.ts.map
@@ -8,7 +8,7 @@ import { GuardExceeded } from "./carriers.js";
8
8
  import { LineIndex } from "./lineIndex.js";
9
9
  import { prepareInline } from "./rawInline.js";
10
10
 
11
- //#region src/internal/blockParser.ts
11
+ // src/internal/blockParser.ts
12
12
  /** Upstream's cheap pre-filter: a line that cannot start any block. */
13
13
  const reMaybeSpecial = /^[#`~*+_=<>0-9-]/;
14
14
  var BlockParser = class {
@@ -415,5 +415,4 @@ var BlockParser = class {
415
415
  */
416
416
  const parseBlocks = (text, dialect = "commonmark", frontmatter = false) => new BlockParser(text, blockDialect(dialect), dialect, frontmatter).parse();
417
417
 
418
- //#endregion
419
418
  export { parseBlocks };
@@ -14,7 +14,7 @@ import { tableCellConstruct, tableConstruct, tableHeaderStart, tableRowConstruct
14
14
  import { taskListItemStart } from "./blocks/taskListItem.js";
15
15
  import { thematicBreakConstruct, thematicBreakStart } from "./blocks/thematicBreak.js";
16
16
 
17
- //#region src/internal/blockRegistry.ts
17
+ // src/internal/blockRegistry.ts
18
18
  const constructTable = (constructs) => new Map(constructs.map((construct) => [construct.type, construct]));
19
19
  const commonmarkDialect = {
20
20
  constructs: constructTable([
@@ -86,5 +86,4 @@ const blockDialect = (dialect) => {
86
86
  return found;
87
87
  };
88
88
 
89
- //#endregion
90
89
  export { blockDialect };
@@ -1,4 +1,4 @@
1
- //#region src/internal/blockTypes.ts
1
+ // src/internal/blockTypes.ts
2
2
  /** Narrow materialized children to the flow content most constructs contain. */
3
3
  const flowChildren = (children) => children.filter((child) => child.type !== "root" && child.type !== "listItem" && child.type !== "tableRow" && child.type !== "tableCell");
4
4
  /** Narrow materialized children to the list items a list contains. */
@@ -23,5 +23,4 @@ const makeBlockNode = (type, startOffset, startLine, depth = 0) => ({
23
23
  data: {}
24
24
  });
25
25
 
26
- //#endregion
27
26
  export { flowChildren, listItemChildren, makeBlockNode, tableCellChildren, tableRowChildren };
@@ -1,6 +1,6 @@
1
1
  import { Heading } from "../../MarkdownNode.js";
2
2
 
3
- //#region src/internal/blocks/atxHeading.ts
3
+ // src/internal/blocks/atxHeading.ts
4
4
  const reATXHeadingMarker = /^#{1,6}(?:[ \t]+|$)/;
5
5
  const reOnlyTrailingHashes = /^[ \t]*#+[ \t]*$/;
6
6
  const reClosingHashes = /[ \t]+#+[ \t]*$/;
@@ -50,5 +50,4 @@ const atxHeadingStart = {
50
50
  }
51
51
  };
52
52
 
53
- //#endregion
54
53
  export { atxHeadingStart, headingConstruct };
@@ -2,7 +2,7 @@ import { Blockquote } from "../../MarkdownNode.js";
2
2
  import { flowChildren } from "../blockTypes.js";
3
3
  import { isSpaceOrTab, peekCode } from "../preprocess.js";
4
4
 
5
- //#region src/internal/blocks/blockquote.ts
5
+ // src/internal/blocks/blockquote.ts
6
6
  const C_GREATERTHAN = 62;
7
7
  /** Blockquote: continues while each line carries its `>` marker. */
8
8
  const blockquoteConstruct = {
@@ -36,5 +36,4 @@ const blockquoteStart = {
36
36
  }
37
37
  };
38
38
 
39
- //#endregion
40
39
  export { blockquoteConstruct, blockquoteStart };
@@ -2,7 +2,7 @@ import { Code } from "../../MarkdownNode.js";
2
2
  import { isSpaceOrTab, peekCode } from "../preprocess.js";
3
3
  import { unescapeString } from "../unescape.js";
4
4
 
5
- //#region src/internal/blocks/code.ts
5
+ // src/internal/blocks/code.ts
6
6
  const reBlankLine = /^[ \t]*$/;
7
7
  const reClosingCodeFence = /^(?:`{3,}|~{3,})(?=[ \t]*$)/;
8
8
  /**
@@ -86,5 +86,4 @@ const codeConstruct = {
86
86
  }
87
87
  };
88
88
 
89
- //#endregion
90
89
  export { codeConstruct };
@@ -1,6 +1,6 @@
1
1
  import { Root } from "../../MarkdownNode.js";
2
2
 
3
- //#region src/internal/blocks/document.ts
3
+ // src/internal/blocks/document.ts
4
4
  /** The document root: contains everything except a bare list item. */
5
5
  const documentConstruct = {
6
6
  type: "document",
@@ -13,5 +13,4 @@ const documentConstruct = {
13
13
  })
14
14
  };
15
15
 
16
- //#endregion
17
16
  export { documentConstruct };
@@ -1,4 +1,4 @@
1
- //#region src/internal/blocks/fencedCode.ts
1
+ // src/internal/blocks/fencedCode.ts
2
2
  const reCodeFence = /^`{3,}(?!.*`)|^~{3,}/;
3
3
  const fenceCharOf = (char) => char === "`" || char === "~" ? char : void 0;
4
4
  /** The fenced-code block start: three or more backticks or tildes. */
@@ -22,5 +22,4 @@ const fencedCodeStart = {
22
22
  }
23
23
  };
24
24
 
25
- //#endregion
26
25
  export { fencedCodeStart };
@@ -3,7 +3,7 @@ import { flowChildren } from "../blockTypes.js";
3
3
  import { stickyOf } from "../patterns.js";
4
4
  import { normalizeLabelText } from "../references.js";
5
5
 
6
- //#region src/internal/blocks/footnoteDefinition.ts
6
+ // src/internal/blocks/footnoteDefinition.ts
7
7
  /**
8
8
  * `_scan_footnote_definition` from `src/scanners.re`:
9
9
  *
@@ -80,5 +80,4 @@ const footnoteDefinitionStart = {
80
80
  }
81
81
  };
82
82
 
83
- //#endregion
84
83
  export { footnoteDefinitionConstruct, footnoteDefinitionStart };
@@ -1,4 +1,4 @@
1
- //#region src/internal/blocks/frontmatter.ts
1
+ // src/internal/blocks/frontmatter.ts
2
2
  const FENCES = /* @__PURE__ */ new Map([
3
3
  ["---", {
4
4
  format: "yaml",
@@ -98,5 +98,4 @@ const scanRawFrontmatter = (source) => {
98
98
  return null;
99
99
  };
100
100
 
101
- //#endregion
102
101
  export { scanFrontmatter, scanRawFrontmatter };
@@ -2,7 +2,7 @@ import { Html } from "../../MarkdownNode.js";
2
2
  import { peekCode } from "../preprocess.js";
3
3
  import { CLOSETAG, OPENTAG } from "../htmlTags.js";
4
4
 
5
- //#region src/internal/blocks/htmlBlock.ts
5
+ // src/internal/blocks/htmlBlock.ts
6
6
  const C_LESSTHAN = 60;
7
7
  const reHtmlBlockOpen = [
8
8
  /./,
@@ -68,5 +68,4 @@ const htmlBlockStart = {
68
68
  }
69
69
  };
70
70
 
71
- //#endregion
72
71
  export { htmlBlockConstruct, htmlBlockStart, isHtmlBlockEnd };
@@ -1,4 +1,4 @@
1
- //#region src/internal/blocks/indentedCode.ts
1
+ // src/internal/blocks/indentedCode.ts
2
2
  /** The indented-code block start: four columns of indentation. */
3
3
  const indentedCodeStart = {
4
4
  name: "indentedCode",
@@ -12,5 +12,4 @@ const indentedCodeStart = {
12
12
  }
13
13
  };
14
14
 
15
- //#endregion
16
15
  export { indentedCodeStart };
@@ -3,7 +3,7 @@ import { makeBlockNode } from "../blockTypes.js";
3
3
  import { parseReference } from "../references.js";
4
4
  import { sliceWithSegments, sourceOffsetAt } from "../segments.js";
5
5
 
6
- //#region src/internal/blocks/linkReferenceDefinition.ts
6
+ // src/internal/blocks/linkReferenceDefinition.ts
7
7
  const C_OPEN_BRACKET = 91;
8
8
  /**
9
9
  * Split every leading link reference definition out of `block`, inserting one
@@ -68,5 +68,4 @@ const definitionConstruct = {
68
68
  }
69
69
  };
70
70
 
71
- //#endregion
72
71
  export { definitionConstruct, extractDefinitions };
@@ -2,7 +2,7 @@ import { List, ListItem } from "../../MarkdownNode.js";
2
2
  import { flowChildren, listItemChildren } from "../blockTypes.js";
3
3
  import { isSpaceOrTab, peekCode } from "../preprocess.js";
4
4
 
5
- //#region src/internal/blocks/list.ts
5
+ // src/internal/blocks/list.ts
6
6
  const reBulletListMarker = /^[*+-]/;
7
7
  const reOrderedListMarker = /^(\d{1,9})([.)])/;
8
8
  const reNonSpace = /[^ \t\f\v\r\n]/;
@@ -155,5 +155,4 @@ const listItemStart = {
155
155
  }
156
156
  };
157
157
 
158
- //#endregion
159
158
  export { listConstruct, listItemConstruct, listItemStart };
@@ -1,7 +1,7 @@
1
1
  import { Paragraph } from "../../MarkdownNode.js";
2
2
  import { extractDefinitions } from "./linkReferenceDefinition.js";
3
3
 
4
- //#region src/internal/blocks/paragraph.ts
4
+ // src/internal/blocks/paragraph.ts
5
5
  /** Paragraph: absorbs lines until a blank one, and contains nothing. */
6
6
  const paragraphConstruct = {
7
7
  type: "paragraph",
@@ -23,5 +23,4 @@ const paragraphConstruct = {
23
23
  }
24
24
  };
25
25
 
26
- //#endregion
27
26
  export { paragraphConstruct };
@@ -1,6 +1,6 @@
1
1
  import { extractDefinitions } from "./linkReferenceDefinition.js";
2
2
 
3
- //#region src/internal/blocks/setextHeading.ts
3
+ // src/internal/blocks/setextHeading.ts
4
4
  const reSetextHeadingLine = /^(?:=+|-+)[ \t]*$/;
5
5
  /** The setext heading block start: a run of `=` or `-` under a paragraph. */
6
6
  const setextHeadingStart = {
@@ -20,5 +20,4 @@ const setextHeadingStart = {
20
20
  }
21
21
  };
22
22
 
23
- //#endregion
24
23
  export { setextHeadingStart };
@@ -3,7 +3,7 @@ import { tableCellChildren, tableRowChildren } from "../blockTypes.js";
3
3
  import { ESCAPABLE } from "../unescape.js";
4
4
  import { sliceWithSegments } from "../segments.js";
5
5
 
6
- //#region src/internal/blocks/table.ts
6
+ // src/internal/blocks/table.ts
7
7
  /**
8
8
  * Upstream's `MAX_AUTOCOMPLETED_CELLS`: the ceiling on cells the parser
9
9
  * invents to pad short rows, which is what stops a wide header followed by a
@@ -374,5 +374,4 @@ const tableCellConstruct = {
374
374
  }
375
375
  };
376
376
 
377
- //#endregion
378
377
  export { tableCellConstruct, tableConstruct, tableHeaderStart, tableRowConstruct, tableRowStart };
@@ -1,4 +1,4 @@
1
- //#region src/internal/blocks/taskListItem.ts
1
+ // src/internal/blocks/taskListItem.ts
2
2
  /**
3
3
  * `_scan_tasklist`, as the generated scanner accepts it.
4
4
  *
@@ -32,5 +32,4 @@ const taskListItemStart = {
32
32
  }
33
33
  };
34
34
 
35
- //#endregion
36
35
  export { taskListItemStart };
@@ -1,6 +1,6 @@
1
1
  import { ThematicBreak } from "../../MarkdownNode.js";
2
2
 
3
- //#region src/internal/blocks/thematicBreak.ts
3
+ // src/internal/blocks/thematicBreak.ts
4
4
  const reThematicBreak = /^(?:\*[ \t]*){3,}$|^(?:_[ \t]*){3,}$|^(?:-[ \t]*){3,}$/;
5
5
  const markerCharOf = (char) => char === "-" || char === "_" || char === "*" ? char : void 0;
6
6
  /** Thematic break: one line, no children. */
@@ -31,5 +31,4 @@ const thematicBreakStart = {
31
31
  }
32
32
  };
33
33
 
34
- //#endregion
35
34
  export { thematicBreakConstruct, thematicBreakStart };
@@ -1,4 +1,4 @@
1
- //#region src/internal/carriers.ts
1
+ // src/internal/carriers.ts
2
2
  /**
3
3
  * The engine's error-code vocabulary: currently exactly one, the
4
4
  * hardening-guard trip. Widens as new parse-error kinds are added.
@@ -38,5 +38,4 @@ var GuardExceeded = class extends Error {
38
38
  /** Narrows `unknown` to {@link GuardExceeded}; never a bare `instanceof` at a call site. */
39
39
  const isGuardExceeded = (u) => u instanceof GuardExceeded;
40
40
 
41
- //#endregion
42
41
  export { GuardExceeded, MARKDOWN_PARSE_ERROR_CODES, RawMarkdownError, isGuardExceeded, isRawMarkdownError };