We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a45d628 commit 40f6acbCopy full SHA for 40f6acb
src/changelog-parser.js
@@ -1,6 +1,6 @@
1
// @flow
2
3
-const versionRx = `v?\\d+\\.\\d+\\.\\d+(-[-a-z0-9.]+)?`
+const versionRx = `v?\\d+\\.\\d+(\\.\\d+(-[-a-z0-9.]+)?)?`
4
5
export type Release = {
6
version: string,
@@ -20,7 +20,8 @@ export default function parseChangelog(text: string): { [string]: Release } {
20
let release: ?Release
21
while ((match = versionHeaderRx.exec(text))) {
22
// console.log(match)
23
- const version = match[1] || match[4]
+ let version = match[1] || match[5]
24
+ if (!match[2] && !match[6]) version += '.0'
25
if (release) release.body = text.substring(start, match.index).trim()
26
release = { version }
27
result[version] = release
0 commit comments