keep-a-changelog
Advanced tools
Comparing version 0.6.6 to 0.6.7
@@ -8,2 +8,8 @@ # Changelog | ||
## [0.6.7] - 2018-11-29 | ||
### Fixed | ||
- Fixed the links sorting to compare issues numerically instead alphabetically | ||
## [0.6.6] - 2018-11-29 | ||
@@ -137,2 +143,3 @@ | ||
[0.6.7]: https://github.com/oscarotero/keep-a-changelog/compare/v0.6.6...v0.6.7 | ||
[0.6.6]: https://github.com/oscarotero/keep-a-changelog/compare/v0.6.5...v0.6.6 | ||
@@ -139,0 +146,0 @@ [0.6.5]: https://github.com/oscarotero/keep-a-changelog/compare/v0.6.4...v0.6.5 |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://github.com/oscarotero/keep-a-changelog#readme", | ||
"version": "0.6.6", | ||
"version": "0.6.7", | ||
"main": "src/index.js", | ||
@@ -8,0 +8,0 @@ "bin": { |
@@ -75,3 +75,3 @@ const Release = require('./Release'); | ||
t.push(''); | ||
links.sort(); | ||
links.sort(compare); | ||
links.forEach(link => t.push(link)); | ||
@@ -100,1 +100,16 @@ } | ||
module.exports = Changelog; | ||
function compare(a, b) { | ||
if (a === b) { | ||
return 0; | ||
} | ||
const reg = /^\[#(\d+)\]:/; | ||
const aNumber = a.match(reg); | ||
const bNumber = b.match(reg); | ||
if (aNumber && bNumber) { | ||
return parseInt(aNumber[1]) - parseInt(bNumber[1]); | ||
} | ||
return a < b ? -1 : 1; | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23592
486