Skip to content

Commit 57faca4

Browse files
committed
update prepareCommitMsg.ts
1 parent 289cbe7 commit 57faca4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/prepareCommitMsg.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function _splitPrefixDesc(value: string) {
4848
let prefix: string, description: string
4949

5050
if (value.includes(":")) {
51-
[prefix, description] = value.split(":")
51+
[prefix, description] = value.split(":", 2)
5252
} else {
5353
[prefix, description] = ["", value]
5454
}
@@ -57,7 +57,7 @@ function _splitPrefixDesc(value: string) {
5757
}
5858

5959
/**
60-
* Split a prefix into a custom prefix and Conventional Commit type prefix.
60+
* Split a prefix (before a colon) into a custom prefix and Conventional Commit type prefix.
6161
*/
6262
function _splitPrefixes(value: string) {
6363
const [customPrefix, typePrefix] = value.includes(" ")

0 commit comments

Comments
 (0)