import type { MetadataField } from './metadata-style.types.js'; /** * The run of metadata lines of a task file, located and parsed. */ export interface MetadataBlock { /** The fields, in file order, with the marking removed. */ readonly fields: readonly MetadataField[]; /** * The raw metadata lines, as written — what a style's `matches` inspects. * Blank lines found inside the run are not here, but are inside * `start`..`end` and therefore disappear when the block is rewritten. */ readonly lines: readonly string[]; /** Index of the first block line in the split content. */ readonly start: number; /** Index just past the last block line. */ readonly end: number; } /** * Locates and parses the metadata block, or returns `undefined` when the file * has none. * * The block is the first run of consecutive metadata lines in the header. It * has to be a run, and not every matching line in the header, so that prose * following the block is left alone. */ export declare function readMetadataBlock(content: string): MetadataBlock | undefined; /** * Replaces the metadata block with `newLines`, or inserts one after the H1 * when the file has none. * * Inserting after the H1 (and not at the top) is what the previous * `setInlineField` did, and it is the only position that keeps the title first. */ export declare function replaceMetadataBlock(content: string, newLines: readonly string[]): string; /** * Removes the metadata block, and the blank line it left behind. */ export declare function removeMetadataBlock(content: string): string; /** Labels are compared case-insensitively, the way every reader already did. */ export declare const sameLabel: (a: string, b: string) => boolean; //# sourceMappingURL=metadata-block.d.ts.map