Improve README content rendering and styles
For some gems on gem.sh the show page renders very weird and broken looking READMEs, we should look into what's causing it and see if there might be a more relaxed Markdown parser which can also better recover from a malformed markdown file.
It might also be that some of our styles are leaking into the rendered markdown content, maybe we need to better scope the selectors.
Example: https://gem.sh/gems/activerecord/v7.0.6
One such issue seems to be related to code blocks with a language specified. I was reviewing a simple gem I wrote and found the readme was looking in disarray.
For example, when the following codeblocks specifying ruby are encountered:
it renders as
and
Link to my example:
- https://gem.sh/gems/output_attributes/v1.0.1
- https://github.com/ttilberg/output_attributes/
I believe the ActiveRecord example is currently suffering the same issue. Fixing the language detection for code blocks might go a long way to resolving the output.
@ttilberg improved this a bit in #44, but I think there are still some thing we can improve, like:
- the character escaping mentioned in #44
- code highlighting in code blocks
- styles of the stylesheet itself
Also some more advanced features could be cool:
- the ability to copy code from code blocks and the
- Auto-reference constants to the docs page when they are mentioned in the README