UNPKG

@limetech/lime-elements

Version:
27 lines 1.12 kB
/** * Pure utility functions for extracting text content from diff structures. */ import { DiffLine, SplitDiffLine } from './types'; /** * Extract the text content of removed lines from a unified change block. * * @param lines - consecutive changed lines from a unified diff hunk * @returns the removed lines joined by newlines, or empty string if none */ export declare function extractRemovedContent(lines: DiffLine[]): string; /** * Extract the text content of removed lines from a split change block. * * @param rows - consecutive changed rows from a split diff hunk * @returns the removed lines joined by newlines, or empty string if none */ export declare function extractRemovedContentFromSplit(rows: SplitDiffLine[]): string; /** * Format a screen-reader summary of diff additions and deletions. * * @param additions - number of added lines * @param deletions - number of removed lines * @returns human-readable summary string, or null if no changes */ export declare function formatDiffSummary(additions: number, deletions: number): string | null; //# sourceMappingURL=content-utils.d.ts.map