Rightpoint / BonMot

Beautiful, easy attributed strings in Swift
MIT License
3.56k stars 197 forks source link

Link<a href> not working properly when enclosed within <h1> heading tag #349

Closed harshitjain0803 closed 5 years ago

harshitjain0803 commented 6 years ago

Hi,

The below HTML text doesn't make 'Click Here' clickable while using BonMot for UITextView.

"<h3>[<a href=\"https://google.com\">...Click Here</a>]</h3>"

When I convert the HTML to string on UITextView without BonMot styling 'Click Here' works as link. But as I am using BonMot styling throughout the project and somehow this is not working. Could you please help with the same.

simulator screen shot - iphone se - 2018-10-23 at 16 10 08

ZevEisenberg commented 5 years ago

Unfortunately, BonMot does not automatically convert <a href=... tags to links, since it is not a full HTML parser. I've considered adding it, but have run into various issues 😢