Skip to content

Commit d55b465

Browse files
committed
add misc field to generator
1 parent 0b04a7a commit d55b465

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

changelog.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@ const output = sep
1515
const bodyJoined = body.join('\n');
1616
return [hash, bodyJoined];
1717
})
18-
.filter(([, body]) => /^[\w]+: [^ ]/.test(body))
18+
// .filter(([, body]) => )
1919
.map(([hash, bodyJoined]) => {
20-
const [section, body] = bodyJoined.split(/: /);
21-
return [hash, section, body];
20+
const hasSection = /^[\w]+: [^ ]/.test(bodyJoined);
21+
if (hasSection) {
22+
const [section, body] = bodyJoined.split(/: /);
23+
return [hash, section, body];
24+
}
25+
return [hash, 'misc', bodyJoined];
2226
})
2327
.reduce((acc, item) => {
2428
const [, section] = item;

0 commit comments

Comments
 (0)