Skip to content

Commit 914f206

Browse files
authored
Merge pull request #30 from rakeen/patch-1
Improve URL_REGEX pattern
2 parents a85ff98 + a4cf89c commit 914f206

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hook.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ validate_commit_message() {
238238
# 6. Wrap the body at 72 characters
239239
# ------------------------------------------------------------------------------
240240

241-
URL_REGEX='^[[:blank:]]*(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]'
241+
URL_REGEX='^[[:blank:]]*(https?|ftp|file|wss?|git|ssh|data|irc|dat)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]'
242242

243243
for i in "${!COMMIT_MSG_LINES[@]}"; do
244244
LINE_NUMBER=$((i+1))

0 commit comments

Comments
 (0)