mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
Improve formatter
This commit is contained in:
@@ -2024,9 +2024,14 @@ static NSString *const kEndedPollPattern = @"<mx-reply>.*<blockquote>.*<br>(.*)<
|
||||
endedPollRegex = [NSRegularExpression regularExpressionWithPattern:kEndedPollPattern options:NSRegularExpressionCaseInsensitive error:nil];
|
||||
});
|
||||
|
||||
NSTextCheckingResult* match = [endedPollRegex firstMatchInString:htmlString options:0 range:NSMakeRange(0, htmlString.length)];
|
||||
NSString* finalString = htmlString;
|
||||
|
||||
if (repliedEvent.eventType != MXEventTypePollEnd) {
|
||||
return finalString;
|
||||
}
|
||||
|
||||
NSTextCheckingResult* match = [endedPollRegex firstMatchInString:htmlString options:0 range:NSMakeRange(0, htmlString.length)];
|
||||
|
||||
if (!(match && match.numberOfRanges > 1)) {
|
||||
// no useful match found
|
||||
return finalString;
|
||||
|
||||
Reference in New Issue
Block a user