psharanda / Atributika

Convert text with HTML tags, links, hashtags, mentions into NSAttributedString. Make them clickable with UILabel drop-in replacement.
MIT License
1.45k stars 155 forks source link

UnOrdered and Ordered list are not getting applied together. #111

Closed ankitthakur closed 4 years ago

ankitthakur commented 4 years ago

Hi team,

We are receiving html string from server, where multiple tags are added like bold, italic, strikethrough, smilies, ordered and unordered list. And when I try to apply all styles on the string, then it's giving compile time error.

Screenshot 2020-03-12 at 2 45 46 PM

psharanda commented 4 years ago

Hi, style(tags:) method is a String method, also it returns value of AttributedText type which doesn't have such method. In other words you can't chain several calls of style(tags:) methods. This is done intentionally, since html parsing makes sense to run just once.