-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVGs fail to render on python.org #701
Comments
Looking at the generated source code, the SVG is getting adding as an HTML "object", rather than as an "img", which I'm guessing means that the image processing logic in https://github.com/python/pythondotorg/blob/master/peps/converters.py#L231 isn't triggering properly. If I can work out how to do it, I expect the simplest fix will be to get the HTML to render with an img tag instead, but failing that, then I may need to work out how to get python.org's PEP rendering to handle HTML object tags in addition to images. (@berkerpeksag Any suggestions on how tricky the last option might be?) |
It looks like this is coming from an old docutils rendering setting that aims to make SVGs compatible with IE6: https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/docutils/writers/html4css1/__init__.py |
#702 works around the immediate problem with PEP 1 by going back to a fixed size PNG (400x200). Beyond that, I'm going to close this issue in favour of #2, since a big part of the problem here is that we're using docutils directly, with a dedicated PEP specific HTML writer that's generating HTML 4.1 with assorted legacy IE6 backwards compatibility cruft. |
After I switched the process diagram in PEP 1 from a PNG to an SVG, it stopped rendering at https://www.python.org/dev/peps/pep-0001/#pep-review-resolution even though it renders correctly locally (it's listing the filename instead of actually showing the diagram)
The text was updated successfully, but these errors were encountered: