Require whole evidence tokens. Do not match src/a.rs inside other/src/a.rs, or use arbitrary task-path overlap as a criterion verdict.
(text: &str, reference: &str)
| 129 | // Require whole evidence tokens. Do not match src/a.rs inside other/src/a.rs, |
| 130 | // or use arbitrary task-path overlap as a criterion verdict. |
| 131 | fn cites(text: &str, reference: &str) -> bool { |
| 132 | citation(text, reference).is_some() |
| 133 | } |
| 134 | |
| 135 | fn citation(text: &str, reference: &str) -> Option<Option<(u32, u32)>> { |
| 136 | text.split(|c: char| c.is_whitespace() || "`\"'()[],;".contains(c)) |