Skip to content

Commit 0288c1e

Browse files
committed
docs: update parseExisting.ts
1 parent 7c02db3 commit 0288c1e

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/generate/parseExisting.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,15 @@
1010
* Require a colon to exist to detect type prefix. i.e. 'ci' will be considered a description, but
1111
* 'ci:' will be considered a prefix. This keeps the check simpler as we don't have to match against
1212
* every type and we don't have to check if we are part of a word e.g. 'circus'.
13-
*
14-
* If there is no colon to indicate a type prefix, but the message looks like a Jira prefix like
15-
* '[ABCD-123]', then use that as a custom prefix.
1613
*/
1714
export function _splitPrefixDesc(value: string) {
1815
let prefix = "";
1916
let description = "";
2017

2118
if (value.includes(":")) {
2219
[prefix, description] = value.split(":", 2);
23-
} else {
20+
}
21+
else {
2422
description = value;
2523
}
2624

@@ -38,7 +36,10 @@ function _splitPrefixes(value: string) {
3836
}
3937

4038
/**
41-
* Separate a message prefixs if any and the description.
39+
* Separate a message into prefixes if any and the description.
40+
*
41+
* If there is no colon to indicate a type prefix, but the message looks like a Jira prefix like
42+
* '[ABCD-123]', then use that as a custom prefix.
4243
*/
4344
export function splitMsg(msg: string) {
4445
const { prefix, description } = _splitPrefixDesc(msg);

0 commit comments

Comments
 (0)