We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bf8369c + c72ad40 commit fa7a3b5Copy full SHA for fa7a3b5
pre_commit_hooks/check_vcs_permalinks.py
@@ -8,7 +8,7 @@
8
9
10
GITHUB_NON_PERMALINK = re.compile(
11
- b'https://github.com/[^/]+/[^/]+/blob/master/[^# ]+#L\d+',
+ b'https://github.com/[^/ ]+/[^/ ]+/blob/master/[^# ]+#L\d+',
12
)
13
14
tests/check_vcs_permalinks_test.py
@@ -15,7 +15,9 @@ def test_passing(tmpdir):
15
# permalinks are ok
16
b'https://github.com/asottile/test/blob/649e6/foo%20bar#L1\n'
17
# links to files but not line numbers are ok
18
- b'https://github.com/asottile/test/blob/master/foo%20bar\n',
+ b'https://github.com/asottile/test/blob/master/foo%20bar\n'
19
+ # regression test for overly-greedy regex
20
+ b'https://github.com/ yes / no ? /blob/master/foo#L1\n',
21
22
assert not main((f.strpath,))
23
0 commit comments