Skip to content

Commit f0735bd

Browse files
committed
fix(changelog-parser): return original header markdown
1 parent 621058c commit f0735bd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/changelog-parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default function parseChangelog(text: string): { [string]: Release } {
2626
if (release) release.body = text.substring(start, match.index).trim()
2727
release = {
2828
version,
29-
header: `${rawVersion}${match[4] || match[8] || ''}`.trim(),
29+
header: match[0],
3030
}
3131
result[version] = release
3232
start = match.index + match[0].length

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ if (!module.parent) {
162162
whatBroke(pkg, { fromVersion, toVersion, full }).then(
163163
(changelog: Array<Release>) => {
164164
for (const { header, body, error } of changelog) {
165-
process.stdout.write(chalk.bold(`# ${header}`) + '\n\n')
165+
process.stdout.write(chalk.bold(header) + '\n\n')
166166
if (body) process.stdout.write(body + '\n\n')
167167
if (error) {
168168
process.stdout.write(`Failed to get changelog: ${error.stack}\n\n`)

0 commit comments

Comments
 (0)