fix: generating broken markdown

This commit is contained in:
darksaid98 committed 2025-09-24 23:20:25 +02:00
1 parent 03d7b4ed20
commit 63a3c6f692
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -70,7 +70,7 @@ export async function generateFooter(previousTagName?: string): Promise<string>
if (includeCompareLink() && previousTagName) {
let link = `${ url }/compare/${ previousTagName }...${ tagName }`;
if (!useGitHubAutolink() || releaseNamePrefix()) link = `[\`${ previousTagName }...${ tagName }\`](${ url }/compare/${ previousTagName }...${ tagName })`;
if (!useGitHubAutolink() || releaseNamePrefix()) link = `[${ previousTagName }...${ tagName }](${ url }/compare/${ previousTagName }...${ tagName })`;
footer.push(`**Full Changelog**: ${ link }`);
}
+1 -1
View File
@@ -59,7 +59,7 @@ export class CommitHashNode extends Node {
if (shouldUseGithubAutolink) return sha;
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
return `[\`${ sha.slice(0, 7) }\`](${ repo.url }/commit/${ sha })`;
return `[${ sha.slice(0, 7) }](${ repo.url }/commit/${ sha })`;
}
}
+1 -1
View File
@@ -138,7 +138,7 @@ it("should generate the changelog footer with the full changelog link", async ()
const result = await generateFooter(info.previous.name);
expect(result).toEqual(`\n\n**Full Changelog**: [\`${ info.previous.name }...${ releaseNameInputValue }\`](${ url }/compare/${ info.previous.name }...${ releaseNameInputValue })`);
expect(result).toEqual(`\n\n**Full Changelog**: [${ info.previous.name }...${ releaseNameInputValue }](${ url }/compare/${ info.previous.name }...${ releaseNameInputValue })`);
expect(getInput).toHaveBeenCalledTimes(1);
+1 -1
View File
@@ -84,5 +84,5 @@ it("should print the sha with the link (not using autolink)", () => {
expect(commitHashNode.shouldUseGithubAutolink).toBe(false);
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
expect(commitHashNode.print()).toBe(`[\`${ sha.slice(0, 7) }\`](${ context.serverUrl }/${ repo.owner }/${ repo.repo }/commit/${ sha })`);
expect(commitHashNode.print()).toBe(`[${ sha.slice(0, 7) }](${ context.serverUrl }/${ repo.owner }/${ repo.repo }/commit/${ sha })`);
});