Skip to content

Commit 6beb7a7

Browse files
authored
Merge pull request #35 from pmoscode/main
Add colon as valid scope character (delimiter)
2 parents a383c68 + 429e1a0 commit 6beb7a7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

conventional_pre_commit/format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def r_types(types):
2323

2424
def r_scope():
2525
"""Regex str for an optional (scope)."""
26-
return r"(\([\w \/-]+\))?"
26+
return r"(\([\w \/:-]+\))?"
2727

2828

2929
def r_delim():

tests/test_format.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def test_r_scope__special_chars():
5353
assert regex.match("(some_thing)")
5454
assert regex.match("(some/thing)")
5555
assert regex.match("(some thing)")
56+
assert regex.match("(some:thing)")
5657

5758

5859
def test_r_delim():

0 commit comments

Comments
 (0)