mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00: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:
parent
3031874d22
commit
97b81a6685
1 changed files with 1 additions and 2 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue