pypa / readme_renderer

Safely render long_description/README files in Warehouse
Apache License 2.0
158 stars 88 forks source link

Docutils settings make math rendering fail in Docutils 0.14+ #172

Closed jwodder closed 2 years ago

jwodder commented 4 years ago

Starting in Docutils 0.14, a warning is emitted if math_output is set to "MathJax" without a URL to a MathJax library appended. readme_renderer currently sets math_output to just "MathJax" and also sets halt_level to 2 (WARNING), meaning that, if an input document uses either the :math: role or math:: directive, a warning is emitted, and then that warning causes the rendering to fail. If your intention is to support math input, you should either append something to the math_output setting (it doesn't matter what, as you don't use the relevent part of the rendered document) or else change the setting to something other than MathJax. (Note that Warehouse also currently doesn't seem to load any MathJax libraries; perhaps that's worth an issue over there.)

di commented 4 years ago

I don't think we've ever supported the math directive on PyPI. If this is suddenly causing failures we should remove it entirely until we're prepared to fully support it.

Fully supporting the math directive is captured in https://github.com/pypa/readme_renderer/issues/115.