Dank icon indicating copy to clipboard operation
Dank copied to clipboard

Improve detection of markdown sent by Reddit

Open saket opened this issue 5 years ago • 0 comments

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.

saket avatar Jan 14 '19 12:01 saket