From dbdf194f6a735bde6a1e4509ac186a87c7b14941 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 4 Dec 2015 10:20:26 -0500 Subject: [PATCH] Adjoin the final context. --- src/Split.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Split.hs b/src/Split.hs index ce21c58c7..3de197fc6 100644 --- a/src/Split.hs +++ b/src/Split.hs @@ -47,7 +47,7 @@ annotatedToRows (Annotated (Info left _ leftCategories, Info right _ rightCatego annotatedToRows (Annotated (Info left _ leftCategories, Info right _ rightCategories) (Indexed i)) before after = (bimap (Ul $ classify leftCategories) (Ul $ classify rightCategories) <$> rows, left, right) where rows = appendRemainder $ foldl sumRows ((start left, start right), []) i - appendRemainder ((previousLeft, previousRight), rows) = rows ++ [ Row (Text <$> lines (substring (Range previousLeft $ end left) before)) (Text <$> lines (substring (Range previousRight $ end right) after)) ] + appendRemainder ((previousLeft, previousRight), rows) = adjoinRows rows [ Row (Text <$> lines (substring (Range previousLeft $ end left) before)) (Text <$> lines (substring (Range previousRight $ end right) after)) ] sumRows ((previousLeft, previousRight), rows) child = ((end left, end right), rows ++ contextRows ++ childRows) where (childRows, left, right) = diffToRows child before after