mirror of
https://github.com/github/semantic.git
synced 2024-11-24 17:04:47 +03:00
Only match leaves.
This commit is contained in:
parent
6327829f6e
commit
8872c67c52
@ -146,8 +146,8 @@ func parserForType(type: String) -> String throws -> Term {
|
||||
|
||||
func refineLeafReplacement(diff: Diff, aString: String, bString: String) -> Diff {
|
||||
switch diff {
|
||||
case let .Pure(.Replace(a, b)):
|
||||
return .Roll((a.extract, b.extract), .Indexed([]))
|
||||
case let .Pure(.Replace(.Unroll(aExtract, .Leaf), .Unroll(bExtract, .Leaf))):
|
||||
return .Roll((aExtract, bExtract), .Indexed([]))
|
||||
default:
|
||||
return diff
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user