From 68679a555c44d6e32bb5cf1b3fc7d4744a6dad85 Mon Sep 17 00:00:00 2001 From: trivialkettle <126059809+trivialkettle@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:07:34 +0100 Subject: [PATCH] Fix changelog parser for gitlab links `GitLab` compare links contain a dash, the dash was not correctly removed from the base url and this leads to incremented dashes in the compare and tag links. --- src/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.ts b/src/parser.ts index c2727be1c..0a222dd4b 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -83,7 +83,7 @@ function processTokens(tokens: Token[], opts: Options): Changelog { while (link) { if (!changelog.url) { - const matches = link.match(/^\[.*\]\:\s*(http.*)\/compare\/.*$/); + const matches = link.match(/^\[.*\]\:\s*(http.*)\/(?:-\/)?compare\/.*$/); if (matches) { changelog.url = matches[1];