Fix compare different node tag

This commit is contained in:
Hugo Stijns
2022-12-29 15:37:21 +01:00
committed by Dave Shanley
parent fc7da1d38d
commit d6031b5440
4 changed files with 82 additions and 12 deletions

View File

@@ -72,7 +72,7 @@ func CompareExamples(l, r *base.Example) *ExampleChanges {
z := 0
for k := range l.Value.ValueNode.Content {
if k%2 == 0 {
lKeys[z] = fmt.Sprintf("%v-%v", l.Value.ValueNode.Content[k].Value, l.Value.ValueNode.Content[k+1].Value)
lKeys[z] = fmt.Sprintf("%v-%v-%v", l.Value.ValueNode.Content[k].Value, l.Value.ValueNode.Content[k+1].Tag, l.Value.ValueNode.Content[k+1].Value)
z++
} else {
continue
@@ -81,7 +81,7 @@ func CompareExamples(l, r *base.Example) *ExampleChanges {
z = 0
for k := range r.Value.ValueNode.Content {
if k%2 == 0 {
rKeys[z] = fmt.Sprintf("%v-%v", r.Value.ValueNode.Content[k].Value, r.Value.ValueNode.Content[k+1].Value)
rKeys[z] = fmt.Sprintf("%v-%v-%v", r.Value.ValueNode.Content[k].Value, r.Value.ValueNode.Content[k+1].Tag, r.Value.ValueNode.Content[k+1].Value)
z++
} else {
continue