/** * Block-level markdown tokenizer. Splits the source into `ContentBlock`s * (headings, paragraphs, blockquotes, list items, math display blocks) and * attaches per-character `sourceMap` arrays so higher layers can map cursor * positions back into the original markdown. */ import type { CodeBlockInfo, ContainerName, ContentBlock, DirectiveName, ParseIssue, ParseOptions } from './types.js'; export { parseDirectiveAttrs, spaceDirectiveLines, MAX_SPACE_LINES } from './attrs.js'; export { codeFenceOpen } from './codeFence.js'; /** Set of directive names recognized today. Unknown names fall through to * paragraph-parsing and downstream warnings flag them. */ export declare const KNOWN_DIRECTIVES: ReadonlySet; /** Set of fenced-container names recognized today. A `:::name` line whose * name is a known container opens a block that runs until a bare `:::`. */ export declare const KNOWN_CONTAINERS: ReadonlySet; /** A fence's info string read (#624): the first word is the language * (lower-cased); a `{…}` block after it, or `key=value` pairs, are * attributes in the directive grammar; anything else after the language * is the title (```` ```console Terminal ````). */ export declare function readCodeInfo(info: string): Pick; /** @internal Number of inputs the parse memo keeps (tests). */ export declare const PARSE_MEMO_CAPACITY = 8; /** * Memoized wrapper around parseMarkdown: returns the cached result when the * input string is byte-for-byte identical to one of the last few calls. * This avoids reparsing a document on each keystroke when upstream * recomputes only because a sibling state changed. */ export declare function parseMarkdownMemo(markdown: string, options?: ParseOptions): ContentBlock[]; export declare function parseMarkdownWithIssuesMemo(markdown: string, options?: ParseOptions): { blocks: ContentBlock[]; issues: ParseIssue[]; }; export declare function parseMarkdown(markdown: string, options?: ParseOptions): ContentBlock[]; /** * Merge consecutive blockquote lines into a single block, and consecutive * non-blank, non-special lines into paragraphs. Index marks (`:index…`) * are taken out first and attached to the blocks holding them * (`ContentBlock.indexMarks`); every source offset still points into * `markdown`. `options` picks how code is read (#624): fences on, indented * code off by default. */ export declare function parseMarkdownWithIssues(markdown: string, options?: ParseOptions): { blocks: ContentBlock[]; issues: ParseIssue[]; }; //# sourceMappingURL=blockParser.d.ts.map