Open mrmans0n opened 3 years ago
To be honest, current markdown implementation has a lot more flaws than just tables. I'll drop an issue number here when work on updated parser will be started
IIRC the problem wasn't with the markdown parser. Reddit has had a history of allowing invalid syntax for many markdown elements including tables. It tries to help by sending HTML alongside plain markdown, but I had decided not to use that and try correcting tables manually here: https://github.com/saket/Dank/blob/39beb5bdd01bb7e1203847be4b2dde5c2fb192fc/app/src/main/java/me/saket/dank/utils/markdown/markwon/MarkwonBasedMarkdownRenderer.java#L185
In hindsight, I think trying to correct reddit's invalid markdowns was a mistake and a lost battle. Rendering their HTML is probably the only foolproof way.
For example, in posts like https://reddit.com/r/leagueoflegends/comments/j92oha/unicorns_of_love_vs_top_esports_2020_world/ the tables from the results are all mangled.