1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00

Wrap indexed Rows elements in Ul elements.

This commit is contained in:
Rob Rix 2015-12-04 10:00:50 -05:00
parent 2b06e3cc10
commit e6c96ed60b

View File

@ -44,8 +44,9 @@ annotatedToRows (Annotated (Info left _ leftCategories, Info right _ rightCatego
leftElements = Span (classify leftCategories) <$> lines (substring left before)
rightElements = Span (classify rightCategories) <$> lines (substring right after)
annotatedToRows (Annotated (Info left _ leftCategories, Info right _ rightCategories) (Indexed i)) before after = (snd $ foldl sumRows ((start left, start right), []) i, left, right)
annotatedToRows (Annotated (Info left _ leftCategories, Info right _ rightCategories) (Indexed i)) before after = (bimap (Ul $ classify leftCategories) <$> rows, left, right)
where
rows = snd $ foldl sumRows ((start left, start right), []) i
sumRows ((previousLeft, previousRight), rows) child = ((end left, end right), rows ++ contextRows ++ childRows)
where
(childRows, left, right) = diffToRows child before after