Skip to content
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

Add aside.topic for Docutils 0.18+ #10493

Merged
merged 2 commits into from Jun 2, 2022
Merged

Conversation

AA-Turner
Copy link
Member

Found when rebuilding the Python documentation with Sphinx 5.

I'm not sure if this is worth a 5.0.1 release or not.

Feature or Bugfix

  • Bugfix

A

@tk0miya
Copy link
Member

tk0miya commented Jun 1, 2022

Is the rendered HTML broken if we don't merge this? I'd like to know how important this fix is.

@AA-Turner
Copy link
Member Author

Is the rendered HTML broken if we don't merge this?

Yes, one second for a screenshot

A

@AA-Turner
Copy link
Member Author

AA-Turner commented Jun 1, 2022

Sphinx 4.5.0:
image

Sphinx 5.0.0:
image

This branch:
image

Script:
import shutil
import types
from pathlib import Path

from docutils.parsers.rst.states import Body
from docutils.statemachine import StringList

from sphinx.cmd.make_mode import run_make_mode
from sphinx.ext.autodoc.directive import parse_generated_content


def write(filename, text): Path(filename).write_text(text, encoding="utf-8")


write("conf.py", '''\
html_theme = "classic"
''')

write("index.rst", '''\
***************************************
An introduction to the ipaddress module
***************************************
.. topic:: Overview

   This document aims to provide a gentle introduction to the
   :mod:`ipaddress` module. It is aimed primarily at users that aren't
   already familiar with IP networking terminology, but may also be useful
   to network engineers wanting an overview of how :mod:`ipaddress`
   represents IP network addressing concepts.
''')

shutil.rmtree("_build", ignore_errors=True)
run_make_mode(["html", ".", "_build", "-T", "-W"])

A

Copy link
Member

@tk0miya tk0miya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. It must be an important bug. So I'm merging this into the 5.0.x branch.

@tk0miya tk0miya merged commit cb407c4 into sphinx-doc:5.0.x Jun 2, 2022
tk0miya added a commit that referenced this pull request Jun 2, 2022
@mgeier
Copy link
Contributor

mgeier commented Jun 4, 2022

This fix is still missing for Sphinx's own theme sphinx13.

I think this is a good example for how it is easy to miss fixes in the sphinx13 theme. That's exactly why I suggested to move it to the rest of the built-in themes: #7733
Maybe this is worth reconsidering?

@AA-Turner
Copy link
Member Author

AA-Turner commented Jun 4, 2022

@mgeier -- thank you and mea culpa, I searched within the sphinx/themes directory. #10521 is a fix for 5.0.2.

A

@mgeier
Copy link
Contributor

mgeier commented Jun 4, 2022

I wouldn't say it's your fault, because the sphinx13 theme is very easy to miss, that's why I suggested #7733, which would make such things harder to miss in the future.

@AA-Turner AA-Turner deleted the more-css branch June 16, 2022 22:18
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants