Skip to content

Commit

Permalink
Fix #4 -- Add mutliline support for ^ and $ (#5)
Browse files Browse the repository at this point in the history
Compile patterns with the `re.MULTILINE` flag. As a result,
in a pattern ^ and $ are now matching start and end
of the line, not just start and end of the string.
  • Loading branch information
moseb authored and codingjoe committed Aug 16, 2019
1 parent f985128 commit f1dadcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion relint.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def load_config(path):
filename = list(filename)
yield Test(
name=test['name'],
pattern=re.compile(test['pattern']),
pattern=re.compile(test['pattern'], re.MULTILINE),
hint=test.get('hint'),
filename=filename,
error=test.get('error', True)
Expand Down

0 comments on commit f1dadcb

Please sign in to comment.