lotusprey / otraku

An unofficial AniList client for Android and iOS
GNU General Public License v3.0
327 stars 11 forks source link

markdown_spoiler span not rendering in comments #111

Closed Anti-Apple4life closed 6 months ago

Anti-Apple4life commented 9 months ago

When I view a comment on the feed, if the comment has a spoiler, it does not render and just shows the raw html of the entire comment.

lotusprey commented 9 months ago

Yep, I do not parse the markdown currently and let the API handle it, but it leaves the job unfinished. Markdown handling is planned.

nstrelow commented 8 months ago

@lotusprey Did you already start working on that?

I think there are some good markdown parsing packages. You probably have some ideas on how to best integrate this with the existing html tag formatting

lotusprey commented 8 months ago

Started working on it long ago, then encountered a problem with the markdown package and stopped. The problem got resolved, but I haven't resumed working on it, because it will take some time (which I don't have right now). Note that the API offers to auto-convert markdown to HTML, but it doesn't work well. The outline of the how it would work is this: I request the data as markdown and immediately convert it to HTML using the markdown package. Then, whenever I render it, I just use the flutter_widget_from_html_core package.

nstrelow commented 8 months ago

Ah very interesting. I was thinking of using a flutter_markdown, which renders it directly. But it also goes through html and doesn't support markdown and html mixed (it will only format the markdown and ignore html).

If you don't mind (and will not work on it for now anyway), I could have a go at it. I have some free evenings and was looking to work on some Flutter (at work I currently have to work with Polymer web components, which I hate)

lotusprey commented 6 months ago

I made #129 which is a superset of this issue, so I will close it.