Skip to content

Commit

Permalink
InvalidLinkBear: Support markdown files
Browse files Browse the repository at this point in the history
Resolve matching for url of type "[valid_url](valid_url)"

Fixes coala#1338
  • Loading branch information
dracarys09 committed Jan 24, 2017
1 parent e20e679 commit 73fac5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bears/general/InvalidLinkBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ def find_links_in_file(file, network_timeout, link_ignore_regex,
[^.:%\s_/?#[\]@\\]+ # Initial part of domain
\. # A required dot `.`
(
(?:[^\s()%\'"`<>|\\]+) # Path name
# This part does not allow
# any parenthesis: balanced or
# unbalanced.
| # OR
\([^\s()%\'"`<>|\\]*\) # Path name contained within ()
(?:[^\s()%\'"`<>|\\\[\]]+) # Path name
# This part does not allow
# any parenthesis: balanced or
# unbalanced.
| # OR
\([^\s()%\'"`<>|\\\[\]]*\) # Path name contained within ()
# This part allows path names that
# are explicitly enclosed within one
# set of parenthesis.
Expand Down
1 change: 1 addition & 0 deletions tests/general/InvalidLinkBearTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def test_run(self):
<http://httpbin.org/status/202>
http://httpbin.org/status/204.....
[httpbin](http://httpbin.org/status/200)
[http://httpbin.org/status/200](http://httpbin.org/status/200)
|http://httpbin.org/status/200|
<h3>Something http://httpbin.org/status/200</h3>
repo=\\"http://httpbin.org/status/200\\"
Expand Down

0 comments on commit 73fac5e

Please sign in to comment.