Skip to content

Commit

Permalink
Add support for escaping | in utils.filter()
Browse files Browse the repository at this point in the history
  • Loading branch information
psss committed Jan 23, 2024
1 parent 2c9b064 commit 1174981
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fmf/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,9 @@ def check_clause(clause):
data = lowered

# At least one clause must be true
return any([check_clause(clause)
for clause in re.split(r"\s*\|\s*", filter)])
return any([
check_clause(re.sub(r"\|", "|", clause))
for clause in re.split(r"\s*(?<!\\)\|\s*", filter)])

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Logging
Expand Down

0 comments on commit 1174981

Please sign in to comment.