/** * Parse annotated body sections from a synced markdown file. * * A `##` line is a section boundary ONLY when the first non-empty line that * follows it is ``. Any other `##` line is treated * as part of the surrounding annotated section's content — this prevents * silent truncation of fields (e.g. Repro Steps) when the field body legitimately * contains `##` text. * * Anything before the first annotated section is the prose preamble. */ export interface AnnotatedSection { /** ADO reference name this section maps to. */ refname: string; /** Body content (everything between the annotation and the next `##` heading). */ content: string; /** Heading text as it appears in the file (for error reporting). */ heading: string; /** Index of the heading line in the source (0-based). */ lineIndex: number; } export interface LocalOnlySection { /** Heading text as it appears in the file. */ heading: string; /** Body content. */ content: string; /** Index of the heading line in the source (0-based). */ lineIndex: number; } export interface ParseAnnotationsResult { /** Sections that sync to ADO fields. */ annotated: AnnotatedSection[]; /** Sections preserved in the file but not synced. */ localOnly: LocalOnlySection[]; /** Any content before the first `##` heading (prose preamble). Trimmed. */ preamble: string; } /** * Parse the body of a markdown file (everything after frontmatter) into * annotated and local-only sections. */ export declare function parseAnnotations(body: string): ParseAnnotationsResult; /** * Build an annotated `##` section as a string. */ export declare function serializeAnnotatedSection(heading: string, refname: string, content: string): string; /** * Check whether a body has any `` annotations. * Used to decide between annotated parsing and legacy fallback. */ export declare function hasAnnotations(body: string): boolean; //# sourceMappingURL=annotation-parser.d.ts.map