mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 17:12:45 +02:00
fix
This commit is contained in:
@@ -51,6 +51,7 @@ class HTMLFormatter: NSObject {
|
||||
DTDefaultFontName: font.fontName,
|
||||
DTDefaultFontSize: font.pointSize,
|
||||
DTDefaultLinkDecoration: false,
|
||||
DTDefaultLinkColor: UIColor.link,
|
||||
DTWillFlushBlockCallBack: sanitizeCallback
|
||||
]
|
||||
options.merge(extraOptions) { (_, new) in new }
|
||||
|
||||
@@ -1749,6 +1749,7 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=(?:'|\")(.*?)(?:'|\")>(
|
||||
if (url.URL)
|
||||
{
|
||||
[str addAttribute:NSLinkAttributeName value:url.URL range:matchRange];
|
||||
[str addAttribute:NSForegroundColorAttributeName value:[UIColor linkColor] range:matchRange];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1083,6 +1083,7 @@ manualChangeMessageForVideo:(NSString*)manualChangeMessageForVideo
|
||||
// If the match is fully in the link, skip it
|
||||
if (NSIntersectionRange(match.range, linkMatch.range).length == match.range.length)
|
||||
{
|
||||
[mutableAttributedString addAttribute:NSForegroundColorAttributeName value:[UIColor linkColor] range:linkMatch.range];
|
||||
hasAlreadyLink = YES;
|
||||
break;
|
||||
}
|
||||
@@ -1097,6 +1098,7 @@ manualChangeMessageForVideo:(NSString*)manualChangeMessageForVideo
|
||||
NSString *link = [mutableAttributedString.string substringWithRange:match.range];
|
||||
link = [link stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
||||
[mutableAttributedString addAttribute:NSLinkAttributeName value:link range:match.range];
|
||||
[mutableAttributedString addAttribute:NSForegroundColorAttributeName value:[UIColor linkColor] range:match.range];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user