#624·jsdiff

Improve integration with `react-diff-view` and investigate if `unidiff` can be entirely obsoleted and deprecated. (Originally: "Is there a way to remove the `======` separator that appears at the top of diffs?")

Author: iryan2Created Jul 24, 2025Updated Feb 23, 2026

I'm using jsdiff with react-diff-view and am finding myself having to remove the =================================================================== line that appears at the top of the output diff, like so:

    if (lines.length > 0 && lines[0].startsWith("======")) {
        // Find the first --- line and start from there
        const headerStart = lines.findIndex((line) => line.startsWith("---"));
        if (headerStart >= 0) {
            return lines.slice(headerStart).join("\n");
        }
    }

The reason appears to be the same as is described in this issue, in that react-diff-view expects diffs to be in either git diff or unidiff format.

Can you please help me understand why it gets included in jsdiff output, and whether there's a way to prevent it? I'd love to avoid having to strip it myself.

Thanks!