mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
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:
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];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user