fixes #18496
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>
if i < len(in)-1 &&
d.Type == diffmatchpatch.DiffDelete &&
in[i+1].Type == diffmatchpatch.DiffInsert &&
if i < len(in)-1 &&
d.Type == diffmatchpatch.DiffDelete &&
in[i+1].Type == diffmatchpatch.DiffInsert &&
- len(d.Text) > 2 &&
- len(in[i+1].Text) > 2 &&
+ len(d.Text) >= 2 &&
+ len(in[i+1].Text) >= 2 &&
d.Text[1] == in[i+1].Text[1] {
eqend := 2
for ; eqend < len(d.Text) && eqend < len(in[i+1].Text) && d.Text[eqend] == in[i+1].Text[eqend]; eqend++ {
d.Text[1] == in[i+1].Text[1] {
eqend := 2
for ; eqend < len(d.Text) && eqend < len(in[i+1].Text) && d.Text[eqend] == in[i+1].Text[eqend]; eqend++ {
if i < len(in)-1 &&
d.Type == diffmatchpatch.DiffDelete &&
in[i+1].Type == diffmatchpatch.DiffInsert &&
if i < len(in)-1 &&
d.Type == diffmatchpatch.DiffDelete &&
in[i+1].Type == diffmatchpatch.DiffInsert &&
- len(d.Text) > 2 &&
- len(in[i+1].Text) > 2 &&
+ len(d.Text) >= 2 &&
+ len(in[i+1].Text) >= 2 &&
d.Text[len(d.Text)-2] == in[i+1].Text[len(in[i+1].Text)-2] {
// eqstart will be the number of equal chars
// before the terminal snp, plus 1 for the snp
d.Text[len(d.Text)-2] == in[i+1].Text[len(in[i+1].Text)-2] {
// eqstart will be the number of equal chars
// before the terminal snp, plus 1 for the snp
b: "tcaAaCCggTc",
expect: []string{"4G>A", "6delinsCC", "9A>T"},
},
b: "tcaAaCCggTc",
expect: []string{"4G>A", "6delinsCC", "9A>T"},
},
+ {
+ a: "tcatagagac",
+ b: "tcacaagac",
+ expect: []string{"4T>C", "6del"},
+ },
} {
c.Log(trial)
var vars []string
} {
c.Log(trial)
var vars []string