Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions ios/inputParser/InputParser.mm
Original file line number Diff line number Diff line change
Expand Up @@ -597,10 +597,13 @@ - (NSArray *)getTextAndStylesFromHtml:(NSString *)fixedHtml {
} else if([tagName isEqualToString:@"code"]) {
[styleArr addObject:@([InlineCodeStyle getStyleType])];
} else if([tagName isEqualToString:@"a"]) {
[styleArr addObject:@([LinkStyle getStyleType])];
// cut only the url from the href="..." string
NSString *url = [params substringWithRange:NSMakeRange(6, params.length - 7)];
stylePair.styleValue = url;
[styleArr addObject:@([LinkStyle getStyleType])];
NSRange hrefRange = [params rangeOfString:@"href="];
stylePair.styleValue = @"";
if(hrefRange.location != NSNotFound) {
NSString *url = [params substringWithRange:NSMakeRange(6, params.length - 7)];
stylePair.styleValue = url;
}
} else if([tagName isEqualToString:@"mention"]) {
[styleArr addObject:@([MentionStyle getStyleType])];
// extract html expression into dict using some regex
Expand Down