From 3d306f6177bb0374bbd5e4877af3da5bb9e7c739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionu=C8=9B=20Man=C8=9Ba?= Date: Fri, 8 Nov 2024 17:38:33 +0200 Subject: [PATCH] [Settings]Fix release cycle links in OOBE What's New page (#35801) * Fix release cycle link in OOBE Previously it would point to the 5ft last release instead. * Adressed feedback --- .../SettingsXAML/OOBE/Views/OobeWhatsNew.xaml.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml.cs index 8f76ddd4fd..ea08769134 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml.cs @@ -123,11 +123,15 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views // Regex to remove installer hash sections from the release notes, since there'll be no Highlights section for hotfix releases. Regex removeHotfixHashRegex = new Regex(RemoveHotFixInstallerHashesRegex, RemoveInstallerHashesRegexOptions); - + int counter = 0; foreach (var release in latestReleases) { releaseNotesHtmlBuilder.AppendLine("# " + release.Name); var notes = removeHashRegex.Replace(release.ReleaseNotes, "\r\n## Highlights"); + + // Add a unique counter to [github-current-release-work] to distinguish each release, + // since this variable is used for all latest releases when they are merged. + notes = notes.Replace("[github-current-release-work]", $"[github-current-release-work{++counter}]"); notes = removeHotfixHashRegex.Replace(notes, string.Empty); releaseNotesHtmlBuilder.AppendLine(notes); releaseNotesHtmlBuilder.AppendLine(" ");