mirror of
https://github.com/github/semantic.git
synced 2025-01-05 05:58:34 +03:00
Define splitDiffByLines over Delete patches.
This commit is contained in:
parent
cea5193999
commit
c2a754bfa0
@ -134,6 +134,8 @@ splitDiffByLines diff (prevLeft, prevRight) sources = case diff of
|
||||
Free (Annotated annotation syntax) -> (splitAnnotatedByLines sources (ranges annotation) (categories annotation) syntax, ranges annotation)
|
||||
Pure (Insert term) -> let (lines, range) = splitTermByLines term (snd sources) in
|
||||
(Row EmptyLine <$> lines, (Range prevLeft prevLeft, range))
|
||||
Pure (Delete term) -> let (lines, range) = splitTermByLines term (snd sources) in
|
||||
(flip Row EmptyLine <$> lines, (range, Range prevRight prevRight))
|
||||
where categories (Info _ left, Info _ right) = (left, right)
|
||||
ranges (Info left _, Info right _) = (left, right)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user