fn merge_adjacent(
    items: &[(SingleLineSpan, Style)]
) -> Vec<(SingleLineSpan, Style)>
Expand description

Merge spans where the end of one span matches the start of the next span.

This reduces the number of ANSI character codes in the output. This is negligible for performance, but makes regression testing easier for difftastic.

The file compare.expected contains hashes of the output, so it considers <green>ab</green> to be distinct from <green>a</green><green>b</green>. Merging the spans normalises the output to <green>ab</green>.