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

handle toctree caption changing from nodes.caption to nodes.title #458

Merged
merged 1 commit into from
Apr 11, 2021

Conversation

jdknight
Copy link
Member

As of Sphinx v3.5.4, changes have been made to the application where a :caption: hint on a toctree node will create a nodes.title instance instead of an nodes.caption instance. This modification was introduced to support styling changes introduced in docutils-0.17 [1].

This commit adjusts the visit_title to detect if the title entry is being built from a toctree node -- if so, forward the node processing back to the existing caption implementation.

[1]: sphinx-doc/sphinx#9053

As of Sphinx v3.5.4, changes have been made to the application where a
`:caption:` hint on a toctree node will create a `nodes.title` instance
instead of an `nodes.caption` instance. This modification was introduced
to support styling changes introduced in docutils-0.17 [1].

This commit adjusts the `visit_title` to detect if the title entry is
being built from a toctree node -- if so, forward the node processing
back to the existing caption implementation.

[1]: sphinx-doc/sphinx#9053

Signed-off-by: James Knight <[email protected]>
@jdknight jdknight merged commit 57ab6c4 into master Apr 11, 2021
@jdknight jdknight deleted the bugfix/handle-toctree-caption-node-change-sphinx35 branch April 11, 2021 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant