Dank
Dank copied to clipboard
Improve detection of markdown sent by Reddit
I decided to parse markdown in the app directly because I thought using custom spans would be easier if the app was in control of parsing markdown. That was a correct assumption, but I soon realized it was a bad idea because markdown on Reddit is a gigantic pile of broken markdown syntaxes. I tried correcting some of them in the app using regex, but is like a losing battle.
I'd like to switch back to using the "processed" markdown HTML that Reddit sends. Android offers an HTML parsing using Html.toHtml()
, but it does not let us use custom spans. We'll have to figure out a way to do that.