1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00

Pass the annotations to freeSyntaxToSplit.

This commit is contained in:
Rob Rix 2015-12-03 10:03:45 -05:00
parent 1c55552a1b
commit c246b08cf4

View File

@ -31,10 +31,10 @@ data Row =
| DeleteRow HTML
straightToSplit :: Diff a Info -> String -> String -> [Row]
straightToSplit (Free (Annotated (left, right) syntax)) = freeSyntaxToSplit syntax
straightToSplit (Free (Annotated (left, right) syntax)) = freeSyntaxToSplit (left, right) syntax
freeSyntaxToSplit :: Syntax a (Diff a Info) -> String -> String -> [Row]
freeSyntaxToSplit (Leaf _) before after = []
freeSyntaxToSplit :: (Info, Info) -> Syntax a (Diff a Info) -> String -> String -> [Row]
freeSyntaxToSplit (left, right) (Leaf _) before after = []
splitDiff :: Diff a Info -> String -> String -> Patch (HTML, Range)
splitDiff diff before after = iter toElements $ splitPatch before after <$> diff