/** * @fileoverview Block structure of a note body, reduced to what inline tag * detection needs: the lines where Obsidian reads no tag — fenced and indented * code, HTML blocks, display math — and the ranges that hold inline content — * paragraphs, headings, table rows. Blockquotes and list items are tracked so * indentation is measured from where a line's content starts. The rules follow * CommonMark except where Obsidian 1.13.7's metadata-cache readback differs; * each difference is noted where it is implemented. Issues #139 and #140. * @module services/obsidian/markdown-blocks */ /** A range of the body, `end` exclusive. Text between spans holds no tag. */ export type BlockSpan = { kind: 'hidden'; start: number; end: number; } | { kind: 'inline'; start: number; end: number; tableRow: boolean; }; /** * CommonMark's open tag and closing tag (raw HTML): a tag name, attributes — * each a name and an optional `=` value, unquoted, single-quoted, or * double-quoted — and an optional `/` before `>`; a closing tag takes no * attributes. Whitespace between the parts may hold one line ending and a * quoted value any number, which only an inline tag can use: a block start is * matched one line at a time. Obsidian 1.13.7 reads both uses by this grammar * — `x y` and `x y` are plain text around a tag, while * `#t` is an element followed by one. Issue #144. */ export declare const HTML_TAG_SOURCE: string; /** * The hidden and inline ranges of `body`, in order and non-overlapping. * Linear in the length of the body: each line is read a bounded number of * times, and a blank line matches its containers without walking them. */ export declare function scanBlocks(body: string): BlockSpan[]; //# sourceMappingURL=markdown-blocks.d.ts.map