Skip to content

Commit

Permalink
Handle newlines, allowing multiline regexps
Browse files Browse the repository at this point in the history
  • Loading branch information
AMDmi3 committed Apr 2, 2018
1 parent c9aedd9 commit 369ad03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion repology/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def __init__(self, repoman, rulesdir=None, rulestext=None):
# compile regexps
for field in ['namepat', 'verpat', 'wwwpat']:
if field in rule:
rule[field] = re.compile(rule[field], re.ASCII)
# replace here handles multiline regexps
rule[field] = re.compile(rule[field].replace('\n', ''), re.ASCII)

rule['matches'] = 0
rule['number'] = rulenum
Expand Down

0 comments on commit 369ad03

Please sign in to comment.