/** * Text normalization utilities for DocShell * * Normalization rules: * - UTF-8 output, \n newlines only * - Remove control characters except \n\t * - Collapse >2 consecutive blank lines into 2 (unless raw mode) * - Ensure output ends with trailing newline */ /** * Normalize text according to DocText v1 spec */ export declare function normalizeText(text: string, raw?: boolean): string; /** * Apply cat-style line numbering */ export declare function numberLines(text: string, nonBlankOnly?: boolean): string; /** * Apply cat -s style blank squeezing */ export declare function squeezeBlank(text: string): string; /** * Apply cat -E style (show line ends as $) */ export declare function showEnds(text: string): string; /** * Apply cat -T style (show tabs as ^I) */ export declare function showTabs(text: string): string; /** * Apply cat -v style (show non-printing characters) */ export declare function showNonPrinting(text: string): string; export interface CatOptions { number?: boolean; numberNonblank?: boolean; squeezeBlank?: boolean; showEnds?: boolean; showTabs?: boolean; showNonprinting?: boolean; } /** * Apply all cat transformations in the correct order */ export declare function applyCatTransforms(text: string, options: CatOptions): string;