patch method
Compute a list of patches to turn text1 into text2. Use diffs if provided, otherwise compute it ourselves.
There are four ways to call this function, depending on what data is available to the caller:
- Method 1:
a
= text1,opt_b
= text2 - Method 2:
a
= diffs - Method 3 (optimal):
a
= text1,opt_b
= diffs - Method 4 (deprecated, use method 3):
a
= text1,opt_b
= text2,opt_c
= diffs
Returns a List of Patch objects.
Implementation
List<p.Patch> patch(Object a, [Object? opt_b, Object? opt_c]) {
return p.patchMake(a, b: opt_b, c: opt_c, diffTimeout: diffTimeout,
diffEditCost: diffEditCost, deleteThreshold: patchDeleteThreshold,
margin: patchMargin);
}