Skip to content

Commit

Permalink
Remove NSMutableParagraphStyle for heading (#429)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw authored Jul 15, 2024
1 parent 9c9769e commit d37974e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions ios/RCTMarkdownUtils.mm
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,6 @@ - (NSAttributedString *)parseMarkdown:(nullable NSAttributedString *)input withA
NSRange rangeForBackground = [inputString characterAtIndex:range.location] == '\n' ? NSMakeRange(range.location + 1, range.length - 1) : range;
[attributedString addAttribute:NSBackgroundColorAttributeName value:_markdownStyle.preBackgroundColor range:rangeForBackground];
// TODO: pass background color and ranges to layout manager
} else if (type == "h1") {
NSMutableParagraphStyle *paragraphStyle = [NSMutableParagraphStyle new];
NSRange rangeWithHashAndSpace = NSMakeRange(range.location - 2, range.length + 2); // we also need to include prepending "# "
[attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:rangeWithHashAndSpace];
}
}

Expand Down

0 comments on commit d37974e

Please sign in to comment.