/** * Convert a string or string[] into a string[]. * Multi-line strings are split by \n. * * D5 deletion semantics: empty content ("" or []) becomes [] — a replace * with empty content therefore deletes its target line/range (the splice in * applyReplaceSingle/applyReplaceRange spreads zero new lines), while the * append/prepend no-op guards (newLines.length === 0) keep "" a no-op there. * Pass [""] explicitly to insert a single empty line. */ export declare function toNewLines(input: string | string[]): string[]; /** * Strip any "LINE#HASH|" prefix from lines if present. * The model sometimes includes annotated hashline format in its replacement content. * * D14: when `refLineCount` (the target file's line count) is provided, a * prefix is stripped ONLY if its line number is a real line of that file * ([1, refLineCount]) — a look-alike prefix pointing at a line that cannot * exist in the file is legitimate user content and survives verbatim. * Anchor-validity is decided by LINE RANGE, not hash match: the pipeline * feeds the working range to apply* (edit-engine test 18 feeds pseudo-anchor * "1#abc|B!" into a 3-line replace and expects the strip), and the hash could * belong to a line the model echoed correctly. Direct calls without a ref * keep the legacy unconditional strip (the bare unit-test contract). */ export declare function stripLinePrefixes(lines: string[], refLineCount?: number): string[]; /** * If replacementLine lost its leading indent, restore it from templateLine. * Only triggers when: * - templateLine has leading whitespace * - replacementLine has NO leading whitespace (but is non-empty) */ export declare function restoreLeadingIndent(templateLine: string, replacementLine: string): string; /** * Strip anchor echo from insert-after operations. * The model sometimes echoes the anchor line at the start of the replacement * in literal annotated-hashline form ("LINE#HASH|anchor"). D4: strips ONLY * when the first new line literally matches the prefix form and its prefixed * content equals the anchor line — a bare content line that merely equals the * anchor (e.g. consecutive "}") is never stripped. */ export declare function stripInsertAnchorEcho(anchorLine: string, newLines: string[]): string[]; /** * Strip anchor echo from insert-before (prepend) operations. * The model sometimes echoes the anchor line at the end of the replacement * in literal annotated-hashline form ("LINE#HASH|anchor"). D4: strips ONLY * when the last new line literally matches the prefix form and its prefixed * content equals the anchor line — a bare content line that merely equals the * anchor is never stripped. */ export declare function stripInsertBeforeEcho(anchorLine: string, newLines: string[]): string[]; /** * Strip range boundary echo from replace-range operations. * The model sometimes includes the boundary lines from the original range * in the replacement content in literal annotated-hashline form. D4: strips * ONLY when the boundary new line literally matches the prefix form and its * prefixed content equals the boundary line — a bare content line that merely * equals the boundary (e.g. re-using the old start line as new content) is * never stripped. * * Detects: * - First line of newLines is "LINE#HASH|lines[startLine-1]" → strip from start * - Last line of newLines is "LINE#HASH|lines[endLine-1]" → strip from end */ export declare function stripRangeBoundaryEcho(lines: string[], startLine: number, endLine: number, newLines: string[]): string[]; //# sourceMappingURL=text-normalize.d.ts.map