Both texts are split on line breaks. A longest-common-subsequence pass keeps shared lines in order and reports the lines that are not shared.
The result marks an unchanged line with a leading space, a removal with a minus, and an addition with a plus. Each side is limited to 400 lines.