Safe Haskell | Safe-Inferred |
---|
Functions to produce text diffs.
Synopsis
- newtype ColorCode = ColorCode Text
- type CharRange = (Int, Int)
- colored1 :: Text -> Text -> Text
- colored2 :: Text -> Text -> Text
- highlightLines :: ColorCode -> IntMap [CharRange] -> [Text] -> [Text]
- ranges :: Text -> Text -> (IntMap [CharRange], IntMap [CharRange])
- data Numbered a = Numbered {
- numbered :: !Int
- numberedVal :: !a
- numberedDiff :: (a -> a -> Bool) -> [a] -> [a] -> [Diff.Diff (Numbered a)]
Documentation
colored1 :: Text -> Text -> Text Source #
Only show the "from" side of the diff, if it's just deletion then that will be enough.
highlightLines :: ColorCode -> IntMap [CharRange] -> [Text] -> [Text] Source #
Apply color ranges as produced by ranges
.
Numbered | |
|