mirror of
https://github.com/github/semantic.git
synced 2024-12-18 04:11:48 +03:00
Move the explicit annotation to the numberRows function
This commit is contained in:
parent
d2595b16cb
commit
6c423dc3b9
@ -64,11 +64,13 @@ split diff before after = return . renderHtml
|
||||
. body
|
||||
. (table ! A.class_ (stringValue "diff")) $ toMarkup
|
||||
[ (colgroup colgroupHtml),
|
||||
tbody . mconcat $ toMarkup <$> ((reverse $ foldl numberRows [] rows) :: [(Int, Row)]) ]
|
||||
tbody . mconcat $ toMarkup <$> (reverse $ foldl numberRows [] rows) ]
|
||||
where
|
||||
colgroupHtml :: Html
|
||||
colgroupHtml = (toMarkup [ col ! A.width (stringValue "40"), col, col ! A.width (stringValue "40"), col ])
|
||||
rows = fst $ diffToRows diff (0, 0) before after
|
||||
|
||||
numberRows :: [(Int, Row)] -> Row -> [(Int, Row)]
|
||||
numberRows [] row = [(1, row)]
|
||||
numberRows rows@((count, _):_) row = (count + 1, row):rows
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user