fix(mod_commit): Fix changelog template rendering by removing extra new line when no version details are provided.
This commit is contained in:
@@ -77,7 +77,7 @@ export const run = async (argvArg: any) => {
|
||||
if (nextCommitObject.recommendedNextVersionDetails?.length > 0) {
|
||||
changelog = changelog.replaceAll('{{nextVersionDetails}}', '- ' + nextCommitObject.recommendedNextVersionDetails.join('\n- '));
|
||||
} else {
|
||||
changelog = changelog.replaceAll('\n\n{{nextVersionDetails}}', '');
|
||||
changelog = changelog.replaceAll('\n{{nextVersionDetails}}', '');
|
||||
}
|
||||
|
||||
await plugins.smartfile.memory.toFs(changelog, plugins.path.join(paths.cwd, `changelog.md`));
|
||||
|
Reference in New Issue
Block a user