1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00

Compute the chunks in a Unified rendering.

This commit is contained in:
Rob Rix 2015-11-27 14:15:42 -05:00
parent ea37bf8889
commit b1629443fb

View File

@ -15,6 +15,10 @@ data Unified =
One (Chunk String)
| Many [Unified]
chunks :: Unified -> [Chunk String]
chunks (One s) = [s]
chunks (Many s) = concatMap chunks s
unified :: Diff a Info -> String -> String -> IO ByteString
unified diff before after = do
renderer <- byteStringMakerFromEnvironment