Skip to content

Commit

Permalink
Merge pull request #35 from pmoscode/main
Browse files Browse the repository at this point in the history
Add colon as valid scope character (delimiter)
  • Loading branch information
thekaveman authored Sep 22, 2022
2 parents a383c68 + 429e1a0 commit 6beb7a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conventional_pre_commit/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def r_types(types):

def r_scope():
"""Regex str for an optional (scope)."""
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 @@ -53,6 +53,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 6beb7a7

Please sign in to comment.