Support Markdown in game descriptions
See original GitHub issueThe fact that Playnite expects game descriptions to be HTML caused some minor confusion in the past (#349); even though there’s a informative tooltip now, it might still cause confusion - especially because I think that most users don’t know what HTML is. Nevertheless is supporting HTML important because some stores use HTML for their game descriptions.
I suggest that the game description field supports Markdown. I guess everyone here on GitHub knows what Markdown is, so I think that I don’t have to explain it. The biggest advantage of Markdown is that it is very intuitive (most importantly: paragraphs work as expected) and its simplicity - and, to return to the above “We must support HTML” requirement, it doesn’t interfere with HTML in any way and it simply passes HTML through without any change. Just to emphasis this, Markdown parsers don’t interpret Markdown inside HTML block elements - thus some *
somewhere in a game description from Steam won’t be parsed as Markdown. Consequently, adding Markdown-support doesn’t break backwards compatibility.
I suggest using a CommonMark-compatible parser. There are some C# Markdown parsers out there Playnite could use (e.g. lunet-io/markdig
or Knagis/CommonMark.NET
).
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:8 (2 by maintainers)
I would actually don’t mind getting rid of HTML support (yes we would have to convert Steam and GOG descriptions) in favor of something that doesn’t render into HTML but FlowDocument instead (like Markdown.XAML).
It would be faster and provide more unified look with the rest of application. Currently HTML descriptions are rendered by HtmlRenderer.WPF, which is basically no longer maintained and has several issues with how the output looks.
Markdown would be much preferable.
Hopefully whatever converter you use will be able to handle some of the walls-of-HTML that tend to be downloaded from the Steam store.