readme_renderer: preserve lang attribute in codeblocks
On PyPI, fenced code blocks from markdown are translated to HTML as
<pre>
...
</pre>
On GitHub, the HTML preserves the language attribute (if given),
<pre lang="python">
...
</pre>
This helps third-party applications, like my Purple Pi, to do fancy stuff. (In the case of Purple Pi to render LaTeX math.) I’d love to see this on PyPI, too.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18 (14 by maintainers)
I haven’t taken a look, but if it’s bringing
cmarkgfm
more inline with what GFM is actually doing, that sounds good to me.If it changes the styles significantly, we’ll make the necessary changes here (and downstream on PyPI) once we update the pin.