{lines.map((raw, i) => {
const line = typeof raw === 'string' ? { text: raw } : raw
// A removed line keeps the old number; the line after it reuses it
const num = line.kind === 'del' || line.number === false ? n : n++
return (
{numbers && {line.kind === 'del' || line.number === false ? '' : num}}
{line.kind === 'add' ? '+' : line.kind === 'del' ? '−' : ''}
{highlight ? tokens(line.text) : line.text}
)
})}
)
}