diff --git a/packages/vant-cli/src/commands/changelog.ts b/packages/vant-cli/src/commands/changelog.ts index 1f32980f7..eff1e6760 100644 --- a/packages/vant-cli/src/commands/changelog.ts +++ b/packages/vant-cli/src/commands/changelog.ts @@ -30,9 +30,9 @@ const commitPartial = `*{{#if scope}} {{scope}}: {{~else}} {{~header}} {{~/if}} -{{#if references~}}, - {{~#each references}} [{{~this.repository}}#{{this.issue}}]({{~@root.repoUrl}}/{{~@root.issue}}/{{this.issue}}) {{/each}} -{{~else}}, [{{shortHash}}]({{~@root.repoUrl}}/{{~@root.commit}}/{{hash}}) +{{#if references~}} + {{~#each references}} [{{~this.repository}}#{{this.issue}}]({{~@root.repoUrl}}/{{~@root.issue}}/{{this.issue}}){{/each}} +{{~else}} [{{shortHash}}]({{~@root.repoUrl}}/{{~@root.commit}}/{{hash}}) {{~/if}} `;