import { MarkdownEditorHighlightColor } from './types'; /** * The highlighter in the source: `==text==` for the default colour, and * `` for the others, which Markdown has no syntax for. * * A line is read the way the renderer reads it, so `==` in an escape, a code * span, a tag or a bare URL opens nothing. */ export interface MarkdownHighlight { /** Where the opening `==` or `` starts. */ from: number; /** The content, between the delimiters. */ start: number; end: number; /** Where the closing delimiter ends. */ to: number; color: MarkdownEditorHighlightColor; } /** A `` without a colour of the palette is the default one. */ export declare function highlightColorOf(tag: string): MarkdownEditorHighlightColor; /** * How much of `text` at `pos` hides `==` from the highlighter, ending by `to`: * an escape, a code span, a tag or a URL. 0 for plain text. */ export declare function opaqueAt(text: string, pos: number, to: number): number; /** * `==text==` at `pos`, on one line: where its content ends, or -1. The content * starts with neither a space nor another `=`, and ends at the first `==` * after a character that is not a space; one in an escape, a code span or a * tag does not count. That first `==` is why the serializer escapes `=`. */ export declare function highlightEnd(text: string, pos: number, to?: number): number; /** The highlights on the line holding `pos`, nested ones included, by where they open. */ export declare function markdownHighlightsOnLine(doc: string, pos: number): MarkdownHighlight[]; /** The innermost highlight whose content holds `pos`, its edges included. */ export declare function markdownHighlightAt(doc: string, pos: number): MarkdownHighlight | null;