lotusprey/otraku

markdown_spoiler span not rendering in comments

Closed this issue · 5 comments

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.

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

@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

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.

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)

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