mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-09 12:54:17 +00:00
Merge pull request #293 from pre-commit/dont_match_whitespace_regex
Improve vcs regex (don't match whitespace)
This commit is contained in:
commit
fa7a3b5466
2 changed files with 4 additions and 2 deletions
|
|
@ -15,7 +15,9 @@ def test_passing(tmpdir):
|
||||||
# permalinks are ok
|
# permalinks are ok
|
||||||
b'https://github.com/asottile/test/blob/649e6/foo%20bar#L1\n'
|
b'https://github.com/asottile/test/blob/649e6/foo%20bar#L1\n'
|
||||||
# links to files but not line numbers are ok
|
# links to files but not line numbers are ok
|
||||||
b'https://github.com/asottile/test/blob/master/foo%20bar\n',
|
b'https://github.com/asottile/test/blob/master/foo%20bar\n'
|
||||||
|
# regression test for overly-greedy regex
|
||||||
|
b'https://github.com/ yes / no ? /blob/master/foo#L1\n',
|
||||||
)
|
)
|
||||||
assert not main((f.strpath,))
|
assert not main((f.strpath,))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue