[FR] Markdown files should render in markdown and not plain text
When viewing a markdown file, it would be useful if it actually rendered, and then gave you the option to view the raw source. GitHub does this: https://github.com/sourcebot-dev/sourcebot/blob/main/README.md
Hi , @brendan-kellam . I’m looking into this issue now and will work on resolving it. Feel free to share any additional context if you have it.
From a UX perspective, imo having a Toggle group similar to GitHub would probably make sense to select between previewing the README or viewing the raw source.
In terms of rendering it, we are already using remark to render Markdown for ask, so that would be a good option here: https://github.com/remarkjs/remark
Hi, I'd like to pick this up. My plan: detect markdown files in the browse view and render them GitHub-style by default, with a toggle to switch back to the raw source (the existing CodeMirror view stays as-is). Rendering would use react-markdown, which is already a dependency. I have the project running locally and the issue reproduced. Does that approach sound good before I start on a PR?