1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Compute the maximum line number.

This commit is contained in:
Rob Rix 2015-12-17 09:59:59 -05:00
parent 705e6047fa
commit 68775ef33f

View File

@ -68,6 +68,9 @@ split diff before after = return . renderHtml
where
rows = fst $ diffToRows diff (0, 0) before after
numbered = foldl numberRows [] rows
maxNumber = case numbered of
[] -> 0
((x, _, y, _) : _) -> max x y
numberRows :: [(Int, Line, Int, Line)] -> Row -> [(Int, Line, Int, Line)]
numberRows [] (Row EmptyLine EmptyLine) = []