Skip to content

Commit

Permalink
Make compatible with changes to use headings instead of bullets
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed Aug 12, 2021
1 parent 12689d5 commit 331749b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bin/plugin/commands/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -673,11 +673,12 @@ async function getChangelog( settings ) {
return;
}

const shouldNest = featureName !== UNKNOWN_FEATURE_FALLBACK_NAME;

// Avoids double nesting such as "Documentation" feature under
// the "Documentation" section.
if ( group !== featureName && shouldNest ) {
if (
group !== featureName &&
featureName !== UNKNOWN_FEATURE_FALLBACK_NAME
) {
// Start new <ul> for the Feature group.
changelog += '#### ' + featureName + '\n';
}
Expand All @@ -688,7 +689,7 @@ async function getChangelog( settings ) {
entry = entry && entry.replace( `[${ featureName } - `, '[' );

// Add a new bullet point to the list.
changelog += shouldNest ? ` ${ entry }\n` : `${ entry }\n`;
changelog += `${ entry }\n`;
} );

// Close the <ul> for the Feature group.
Expand Down

0 comments on commit 331749b

Please sign in to comment.