export type TextSpan = { start: number; end: number; }; /** How many characters of markdown syntax start at `index` (0 when none). */ export declare function markupLengthAt(text: string, index: number): number; /** * Widens a span of markdown so the syntax inside it is balanced: emphasis it * opens is closed, and a link it starts keeps its destination. */ export declare function balanceMarkupSpan(text: string, span: TextSpan): TextSpan; /** * Spans of markdown `source` that render as `rendered`, in order. Each span * starts at the first rendered character and is widened to balanced syntax. */ export declare function sourceSpansForRenderedText(source: string, rendered: string): TextSpan[]; /** Spans of rendered `plain` text that show the markdown `quote`, in order. */ export declare function renderedSpansForSourceQuote(plain: string, quote: string): TextSpan[]; /** * How a markdown quote reads once rendered, for showing it in annotation * chips, cards and previews. Links keep their text, emphasis and block * markers drop out, and escaped characters lose their backslash. */ export declare function renderedMarkdownQuote(quote: string): string;