/** * Build an array of character indices at which each line (0-based) starts. * lineOffsets[i] = character index where line i starts in `code`. */ export declare function buildLineOffsets(code: string): number[]; /** * Get an array of line numbers (1-based) that contain matches for the given query. * Both exact and regex matches are supported. * Accepts a pre-built array of line offsets for better performance for repeated searches * on the same code. */ export declare function getMatchingLineNumbers(code: string, query: string, isRegExpMode: boolean, lineOffsets?: number[]): number[]; export declare const wrapMark: (match: string) => string; export declare function escapeInnerHTML(raw: string): string; export declare function escapeHTMLIfNeeded(raw: string, regExp?: RegExp, escape?: typeof escapeInnerHTML): string; export declare function highlightMatchingChars(code: string, query: string, isRegExpMode: boolean): string; /** * A regular expression to match a line number expression. * Examples of valid expressions: * - "1" (a single line number) * - "1-5" (a range of line numbers) * - "1,3,5" (a list of individual line numbers) * - "1-3,5,7-10" (a mix of ranges and individual numbers) */ export declare const LINE_NUMBER_EXPRESSION_REGEX: RegExp; export declare function normalizeHighlightedLines(lines: string | Array, maxLines: number): number[];