Skip to content

Commit

Permalink
improve markdown content
Browse files Browse the repository at this point in the history
  • Loading branch information
Scighost committed May 25, 2024
1 parent 8c32e6d commit f771e03
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/Starward/MyWindows/UpdateContentWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ private async Task LoadPageAsync()

var releases = await _metadataClient.GetGithubReleaseAsync(1, 20);
var markdown = new StringBuilder();
int count = 0;
foreach (var release in releases)
{
if (NuGetVersion.TryParse(release.TagName, out var version))
Expand All @@ -120,6 +121,7 @@ private async Task LoadPageAsync()
markdown.AppendLine(release.Body);
markdown.AppendLine("<br>");
markdown.AppendLine();
count++;
}
}
}
Expand All @@ -130,6 +132,11 @@ private async Task LoadPageAsync()
markdown.AppendLine(release.Body);
markdown.AppendLine("<br>");
markdown.AppendLine();
count++;
}
if (count >= 10)
{
break;
}
}
if (markdown.Length == 0)
Expand Down
2 changes: 0 additions & 2 deletions src/Starward/Pages/UpdatePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ private async Task ShowGithubReleaseAsync(string tag)
string markdown = $"""
# {release.Name}

> Update at {release.PublishedAt.LocalDateTime:yyyy-MM-dd HH:mm:ss}

{release.Body}

""";
Expand Down

0 comments on commit f771e03

Please sign in to comment.