Skip to content

Commit 84cc060

Browse files
committed
Remove _pre from the current stabe changelog page pointing to the prerelease
1 parent fbd23d6 commit 84cc060

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ddoc/source/preprocessor.d

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,13 @@ auto genChangelogVersion(string fileName, string fileText)
346346
}
347347
else
348348
{
349-
macros ~="\n$(CHANGELOG_NAV %s, %s)".format(versions[el.index - 1], versions[el.index + 1]);
349+
const prevVersion = versions[el.index - 1].to!string;
350+
auto nextVersion = versions[el.index + 1].to!string;
351+
// the next version is the beta release
352+
if (el.index == versions.length - 2 && hasPrerelease)
353+
nextVersion = std.array.replace(nextVersion, "_pre", "");
354+
355+
macros ~="\n$(CHANGELOG_NAV %s, %s)".format(prevVersion, nextVersion);
350356
}
351357
macros ~= "\n_=";
352358
}

0 commit comments

Comments
 (0)