Project sequence evidence through item mappings
This commit is contained in:
@@ -165,10 +165,11 @@ func fragmentVersionClaimWithIndex(root *document.Node, rule *VersionRule, sourc
|
||||
return current
|
||||
}
|
||||
if assigned, found := ranges[sequenceRangeKey{sourceIndex: sourceIndex, path: currentPath.String()}]; found {
|
||||
if index < assigned.start || index >= assigned.end {
|
||||
projected, ok := assigned.inputForOutput(index)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
index -= assigned.start
|
||||
index = projected
|
||||
}
|
||||
if index < 0 || index >= len(current.Sequence) {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user