Skip to content

Commit

Permalink
feat: support comma separated scopes (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman authored Jan 12, 2024
2 parents 95c1ea1 + fceafb9 commit 0304553
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conventional_pre_commit/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ def r_types(types):
def r_scope(optional=True):
"""Regex str for an optional (scope)."""
if optional:
return r"(\([\w \/:-]+\))?"
return r"(\([\w \/:,-]+\))?"
else:
return r"(\([\w \/:-]+\))"
return r"(\([\w \/:,-]+\))"


def r_delim():
Expand Down
1 change: 1 addition & 0 deletions tests/test_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def test_r_scope__special_chars():
assert regex.match("(some/thing)")
assert regex.match("(some thing)")
assert regex.match("(some:thing)")
assert regex.match("(some,thing)")


def test_r_delim():
Expand Down

0 comments on commit 0304553

Please sign in to comment.