Title
Heading 1
Description
Heading 2
Long text about this
Open barseghyanartur opened 1 year ago
Result
Description
Long text about this
pip-list
bleach 5.0.1
docutils 0.19
pip 22.2.2
Pygments 2.14.0
readme-renderer 37.3
restview 3.0.0
setuptools 62.6.0
six 1.16.0
webencodings 0.5.1
wheel 0.37.1
python 3.11.1
Hm, an incompatibility with some library. It works fine for me with
$ pipx runpip restview list
Package Version
--------------- -------
bleach 5.0.0
docutils 0.18.1
pip 22.3.1
Pygments 2.12.0
readme-renderer 35.0
restview 3.0.0
setuptools 65.6.3
six 1.16.0
webencodings 0.5.1
wheel 0.38.4
but if I upgrade readme-renderer to 37.3, pygments to 2.12.0, and bleach to 5.0.1, I get the same dump of raw CSS at the top.
Downgrading readme-renderer back to 35.0 fixes it.
readme-renderer 36.0 works fine, 37.0 breaks.
So this is entirely my fault, since I'm subclassing readme_renderer.rst.ReadMeHTMLTranslator and assuming that it in turn subclasses docutils.writers.html4css1.HTMLTranslator.
readme-renderer 37.0 switched from subclassing html4css1.HTMLTranslator to html5_polyglot.HTMLTranslator in https://github.com/pypa/readme_renderer/commit/d853780f665817d49e5d7340cc693e31f199102d.
Oh oh oh the test failures I saw and fixed recently (commit 5033eacb1d5552e496a0da46f6a474a38b414f21) were probably not related to the new docutils, but to the new readme-renderer. Unfortunately it's hard to see the problem when viewing raw HTML diffs.
I confirm, that downgrading readme-renderer
to 36.0 brings things back to normal.
I've released restview 3.0.1 to PyPI as a stopgap measure. It adds a version requirement for readme-renderer < 37.
A proper fix will take longer.
Produces weird results (on top).
<body>
and<style>
tags not opened/closed properly - result in a broken view.