mirror of
https://github.com/github/semantic.git
synced 2024-12-28 09:21:35 +03:00
Remove showRow.
This commit is contained in:
parent
3f22926e86
commit
c6ef5b4ef8
@ -46,13 +46,6 @@ showChange sources change = showLines (snd sources) ' ' (unRight <$> context cha
|
||||
showLines :: Source Char -> Char -> [Line (SplitDiff leaf Info)] -> String
|
||||
showLines source prefix lines = fromMaybe "" . mconcat $ fmap (prefix :) . showLine source <$> lines
|
||||
|
||||
showRow :: (Source Char, Source Char) -> Row (SplitDiff leaf Info) -> String
|
||||
showRow sources (Row lineA lineB) = if stringA == stringB
|
||||
then maybe "" (' ' :) stringB
|
||||
else maybe "" ('-' :) stringA ++ maybe "" ('+' :) stringB
|
||||
where stringA = showLine (fst sources) lineA
|
||||
stringB = showLine (snd sources) lineB
|
||||
|
||||
showLine :: Source Char -> Line (SplitDiff leaf Info) -> Maybe String
|
||||
showLine _ EmptyLine = Nothing
|
||||
showLine source line = Just . toString . (`slice` source) . unionRanges $ getRange <$> unLine line
|
||||
|
Loading…
Reference in New Issue
Block a user