\n
\n {diff.map((r, i) => {\n const add = r.type === \"add\";\n const del = r.type === \"del\";\n // one gutter column: removals keep the old number, additions/context show the new one\n const num = del ? r.old : r.cur;\n return (\n
\n {(add || del) && (\n
\n )}\n
{num ?? \"\"}\n
\n \n \n
\n );\n })}\n
\n
\n {lines.map((line, i) => (\n
\n {i + 1}\n {highlight(line)}\n
\n ))}\n