Share edit location and check protected names in full segments
This commit is contained in:
@@ -151,12 +151,8 @@ func GenerateCandidates(ctx context.Context, req Request) (Result, error) {
|
||||
for i, raw := range response.Corrections {
|
||||
references = append(references, raw.SegmentReference)
|
||||
// Unknown references remain invalid candidates for the existing domain validators.
|
||||
targetID := 0
|
||||
if req.WorkingTranscript != nil && raw.SegmentReference > 0 && raw.SegmentReference <= len(req.WorkingTranscript.Segments) {
|
||||
targetID = req.WorkingTranscript.Segments[raw.SegmentReference-1].ID
|
||||
}
|
||||
candidate := proposals.CorrectionProposal{
|
||||
TargetSegmentID: targetID,
|
||||
TargetSegmentID: proposals.SegmentIDAtReference(req.WorkingTranscript, raw.SegmentReference),
|
||||
OriginalText: raw.OriginalText,
|
||||
CorrectedText: raw.CorrectedText,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user