mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
Unified rendering of patches.
This commit is contained in:
parent
cbd1c962ca
commit
55d9cfb129
@ -21,7 +21,7 @@ unified diff before after =
|
||||
f (Info range _) (Keyed k) = (unifiedRange range (sort $ snd <$> Map.toList k) after, Just range)
|
||||
|
||||
unifiedPatch :: Patch (Term a Info) -> String
|
||||
unifiedPatch _ = ""
|
||||
unifiedPatch patch = maybe "" (change "-" . unifiedTerm before) $ Patch.before patch
|
||||
|
||||
unifiedTerm :: String -> Term a Info -> String
|
||||
unifiedTerm source term = fst $ cata f term
|
||||
|
Loading…
Reference in New Issue
Block a user