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

@@ -42,11 +42,17 @@
[self displayReleaseNotes:_preloadedReleaseNotes];
_preloadedReleaseNotes = nil;
} else if (_appcastItem.releaseNotesURL == nil) {
NSString *descriptionHTML = _appcastItem.itemDescription;
if (descriptionHTML != nil) {
NSData *htmlData = [descriptionHTML dataUsingEncoding:NSUTF8StringEncoding];
NSAttributedString *attributedString = [[NSAttributedString alloc] initWithHTML:htmlData documentAttributes:NULL];
[self displayReleaseNotes:attributedString];
NSString *descriptionString = _appcastItem.itemDescription;
if (descriptionString != nil) {
NSString *descriptionFormat = _appcastItem.itemDescriptionFormat;
if ([descriptionFormat isEqualToString:@"plain-text"] || [descriptionFormat isEqualToString:@"markdown"]) {
NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:descriptionString];
[self displayReleaseNotes:attributedString];
} else {
NSData *htmlData = [descriptionString dataUsingEncoding:NSUTF8StringEncoding];
NSAttributedString *attributedString = [[NSAttributedString alloc] initWithHTML:htmlData documentAttributes:NULL];
[self displayReleaseNotes:attributedString];
}
}
}
}