Improve extracting signed markdown content (#2828)

This strips the beginning sparkle sign warning comment (if present) in the release notes downloader driver rather than the user driver. The comment is also stripped (if present) in generate_appcast when inserting embedded release notes.

Also improve markdown compatibility with sparkle-cli and alternative user driver in Sparkle Test App.
This commit is contained in:
Zorg authored and GitHub committed 2026-01-03 19:43:12 -08:00
1 parent d3ae95f76f
commit 736b331dd6
17 files changed
+188 -99

No files matched your search

+4 -2
View File
@@ -82,7 +82,7 @@
NSData *descriptionData = [appcastItem.itemDescription dataUsingEncoding:NSUTF8StringEncoding];
if (descriptionData != nil) {
NSString *itemDescriptionFormat = appcastItem.itemDescriptionFormat;
if (itemDescriptionFormat != nil && [itemDescriptionFormat isEqualToString:@"plain-text"]) {
if (itemDescriptionFormat != nil && ([itemDescriptionFormat isEqualToString:@"plain-text"] || [itemDescriptionFormat isEqualToString:@"markdown"])) {
[self displayPlainTextReleaseNotes:descriptionData encoding:NSUTF8StringEncoding];
} else {
[self displayHTMLReleaseNotes:descriptionData];
@@ -124,7 +124,9 @@
- (void)showUpdateReleaseNotesWithDownloadData:(SPUDownloadData *)downloadData
{
if (_verbose) {
if (downloadData.MIMEType != nil && [downloadData.MIMEType isEqualToString:@"text/plain"]) {
NSString *MIMEType = downloadData.MIMEType;
NSString *fileExtension = downloadData.URL.pathExtension;
if ([MIMEType isEqualToString:@"text/plain"] || [MIMEType isEqualToString:@"text/markdown"] || [MIMEType isEqualToString:@"text/x-markdown"] || [fileExtension caseInsensitiveCompare:@"txt"] == NSOrderedSame || [fileExtension caseInsensitiveCompare:@"md"] == NSOrderedSame || [fileExtension caseInsensitiveCompare:@"markdown"] == NSOrderedSame) {
NSStringEncoding encoding;
if (downloadData.textEncodingName == nil) {
encoding = NSUTF8StringEncoding;