mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
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:
@@ -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 ®exes {
|
||||
if regex.is_match(line_trim) {
|
||||
if regex.is_match(line) {
|
||||
return Some((regex.clone(), *is_algo_based));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user