This commit is contained in:
Mauro Romito
2023-01-11 21:29:02 +01:00
parent d50ef171d5
commit 3c2ab08e02
5 changed files with 4 additions and 3 deletions
@@ -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];
}
}
}