Set HTML formatter as static

This commit is contained in:
aringenbach
2022-06-13 13:24:19 +02:00
committed by aringenbach
parent 24c3ba53e5
commit f2e14f2512
3 changed files with 16 additions and 18 deletions
@@ -1773,10 +1773,8 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=(?:'|\")(.*?)(?:'|\")>(
// Apply the css style that corresponds to the event state
UIFont *fontForWholeString = [self fontForEvent:event string:htmlString];
HTMLFormatter *htmlFormatter = [[HTMLFormatter alloc] init];
MXWeakify(self);
NSAttributedString *str = [htmlFormatter formatHTML:html
NSAttributedString *str = [HTMLFormatter formatHTML:html
withAllowedTags:_allowedHTMLTags
font:fontForWholeString
andImageHandler:_htmlImageHandler