mirror of
https://github.com/github/semantic.git
synced 2024-11-24 17:04:47 +03:00
Compute the maximum line number.
This commit is contained in:
parent
705e6047fa
commit
68775ef33f
@ -68,6 +68,9 @@ split diff before after = return . renderHtml
|
|||||||
where
|
where
|
||||||
rows = fst $ diffToRows diff (0, 0) before after
|
rows = fst $ diffToRows diff (0, 0) before after
|
||||||
numbered = foldl numberRows [] rows
|
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 :: [(Int, Line, Int, Line)] -> Row -> [(Int, Line, Int, Line)]
|
||||||
numberRows [] (Row EmptyLine EmptyLine) = []
|
numberRows [] (Row EmptyLine EmptyLine) = []
|
||||||
|
Loading…
Reference in New Issue
Block a user