Skip to content

Commit 873bde1

Browse files
anthonylee991claude
andcommitted
Fix spans_overlap boundary check (off-by-one in 50% threshold)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1a9208e commit 873bde1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/extractor/hybrid.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fn spans_overlap(a: (usize, usize), b: (usize, usize)) -> bool {
7878
let b_len = b.1 - b.0;
7979

8080
// If overlap is >50% of either span, consider them overlapping
81-
overlap_len * 2 > a_len || overlap_len * 2 > b_len
81+
overlap_len * 2 >= a_len || overlap_len * 2 >= b_len
8282
}
8383

8484
/// Check if two triplets are semantically similar

0 commit comments

Comments
 (0)