/** * Relative heading levels. A section value carries heading `#`-counts relative * to the container of the span being written; on write they are rebased to * absolute by adding a baseline: * * - `content` scope → baseline = the target section's own level (`#` = a direct * child). * - `markerAndContent` / sibling insert → baseline = the *parent's* level * (`# Title` = a section at the target's own level). * - document root → baseline 0, so relative == absolute and whole-document * writes are byte-identical. * * This is well-founded because a section can never contain a heading at or above * its own level, so stripping the container's level on read and re-adding it on * write round-trips losslessly. A rebased level past h6 is still written (the * `#`s go in verbatim) but is reported as a warning, since the "heading" will * not be structurally addressable in the next map. * * The value is normalized to LF here; the engine re-applies the document's line * ending when it splices the result in. */ import { Warning } from "./instructions.js"; export interface RebaseResult { text: string; warnings: Warning[]; } /** * Rewrite each top-level heading's `#`-count in `value` by adding `baseline`, * leaving `#` lines inside fenced code (and all other content) untouched. */ export declare const rebaseHeadings: (value: string, baseline: number) => RebaseResult; //# sourceMappingURL=levels.d.ts.map