Skip to content

Commit

Permalink
.gitlint: Also ignore URLs with hash fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
keks committed Aug 11, 2020
1 parent b4f65c1 commit 383608c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .gitlint-rules/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
gitlint.rule_finder.assert_valid_rule_class = lambda *_: True

# URL regular expression.
URL_RE_RAW = r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+'
URL_RE_RAW = r'http[s]?://(?:[a-zA-Z]|[0-9]|[#-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+'
URL_RE = re.compile(URL_RE_RAW, re.IGNORECASE)
LINE_MATCH_RE = re.compile(r'.*' + URL_RE_RAW + r'$')

Expand Down

0 comments on commit 383608c

Please sign in to comment.