uucore(checksum): determine regex from full line, not trimmed

The full line will be matched against the selected regex anyway
This commit is contained in:
Dorian Péron
2024-10-24 11:41:54 +02:00
parent 3031874d22
commit 97b81a6685
+1 -2
View File
@@ -307,9 +307,8 @@ fn determine_regex(lines: &[String]) -> Option<(Regex, bool)> {
];
for line in lines {
let line_trim = line.trim();
for (regex, is_algo_based) in &regexes {
if regex.is_match(line_trim) {
if regex.is_match(line) {
return Some((regex.clone(), *is_algo_based));
}
}