mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-27 23:19:13 +08:00
[Settings][OOBE] Update RemoveInstallerHashesRegex to match new installers list (#25257)
* [Settings][OOBE] Update RemoveInstallerHashesRegex to match new installers list * Match everything between hashes and highlights
This commit is contained in:
parent
02349f1f6f
commit
1387c3a9a9
@ -55,7 +55,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
||||
/// <summary>
|
||||
/// Regex to remove installer hash sections from the release notes.
|
||||
/// </summary>
|
||||
private const string RemoveInstallerHashesRegex = @"((\r\n)+#+ installer hashes)?((\r\n)+#+( x64)?( arm64)? installer( SHA256)? hash(\r\n)+[0-9A-F]{64})+";
|
||||
private const string RemoveInstallerHashesRegex = @"(\r\n)+## Installer Hashes(\r\n.*)+## Highlights";
|
||||
private const RegexOptions RemoveInstallerHashesRegexOptions = RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant;
|
||||
|
||||
private static async Task<string> GetReleaseNotesMarkdown()
|
||||
@ -89,7 +89,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
||||
foreach (var release in latestReleases)
|
||||
{
|
||||
releaseNotesHtmlBuilder.AppendLine("# " + release.Name);
|
||||
var notes = removeHashRegex.Replace(release.ReleaseNotes, string.Empty);
|
||||
var notes = removeHashRegex.Replace(release.ReleaseNotes, "\r\n## Highlights");
|
||||
releaseNotesHtmlBuilder.AppendLine(notes);
|
||||
releaseNotesHtmlBuilder.AppendLine(" ");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user