Skip to content

Commit f1dadcb

Browse files
mosebcodingjoe
authored andcommitted
Fix #4 -- Add mutliline support for ^ and $ (#5)
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.
1 parent f985128 commit f1dadcb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

relint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def load_config(path):
5353
filename = list(filename)
5454
yield Test(
5555
name=test['name'],
56-
pattern=re.compile(test['pattern']),
56+
pattern=re.compile(test['pattern'], re.MULTILINE),
5757
hint=test.get('hint'),
5858
filename=filename,
5959
error=test.get('error', True)

0 commit comments

Comments
 (0)