Add wrapped side-by-side renderer by hayatogh · Pull Request #563 · rtfpessoa/diff2html

added 3 commits

August 9, 2025 16:15
This is a preparation commit for a new wrapped side-by-side diff
renderer.

The new diff view uses four-column tables. Adding colspan allows block
headers to span the full width of the table, ensuring they are
formatted correctly.

This change is backward-compatible. Existing templates will not be
affected because the colspan attribute defaults to 1 and is optional.
This commit introduces wrapped side-by-side as the third diff mode.

The wrapped side-by-side style requires that corresponding old and new
lines have the same height, even when only one side of a line wraps.
To achieve this without JavaScript, lines are placed on the same row
within an HTML table.

Because this approach results in a fundamentally different HTML
structure from the current synchronized scrolling mode,
it was implemented as a new, independent renderer.
This commit adds tests for the new wrapped side-by-side renderer.
The tests are based on and adapted from the existing test suite for the
synchronized scroll side-by-side mode.