import type { InlineSpan, MathMeta, ParseIssue } from './types.js'; /** Object Replacement Character — atomic plain-text placeholder for a math * span. One code unit per formula so `sourceMap` stays 1-to-1. */ export declare const MATH_PLACEHOLDER = "\uFFFC"; /** Extract inline `$...$` math spans from a line's text. * - Returns a cleaned text where each match is replaced by `MATH_PLACEHOLDER`. * - Returns the list of math metadata aligned with the order of placeholders. * - Detects unclosed `$` (odd number of unescaped `$` in the text). * * `absOffsets[i]` is the absolute source offset of `text[i]` in the original * markdown; used to emit accurate `sourceStart`/`sourceEnd` on each math * span. When the caller cannot provide an exact map (e.g. text has been * reassembled from multiple source lines) it can pass `null` and math * offsets will default to the block's source range. */ export declare function extractInlineMath(text: string, absOffsets: number[] | null, fallbackStart: number, fallbackEnd: number, /** Pandoc's rule (`tex_math_dollars`), for snippets (#541): an opening * `$` has no space after it, a closing one no space before it and no * digit after it, so the prices of "$5 to $10" stay text. A `$` that * opens nothing is text, and raises no `unclosedMath`. */ strict?: boolean): { cleaned: string; maths: MathMeta[]; issues: ParseIssue[]; }; /** Walk an InlineSpan list and attach MathMeta to each `\uFFFC` occurrence * in order. Splits plain-text spans around the placeholder so the math * span is its own entry (carrying the ambient bold/italic). */ export declare function injectMathSpans(spans: InlineSpan[], maths: MathMeta[]): InlineSpan[]; /** Align each math placeholder's `sourceMap[i]` entry with its formula. * Where the map already points at the formula's opening `$`, the map is * right and the span's `sourceStart`/`sourceEnd` take it: those were read * from the line after its references, chips and citations had shrunk to * one character, and drift after each one (#1215). Otherwise the entry * takes the span's `sourceStart`. */ export declare function fixMathSourceMap(markdown: string, text: string, spans: InlineSpan[], sourceMap: number[]): void; //# sourceMappingURL=inlineMath.d.ts.map