-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
unknown node type ifconfig in sphinx 5.0.0 #10496
Comments
I removed the |
Hi David, Is there a single file minimal reproducer? I assume this worked on 4.5.0? A |
Yes it worked with older sphinx. I'll try to make a single file reproducer today. |
Build command:
It seems my use of |
Yes, if I add any normal text between the two ifconfig sections then it works. Edit: typo |
Here's a simpler index.rst that triggers it:
|
Thanks David! I'll look into this now. A |
If I put a comment And thanks for looking into it so quickly. Appreciated. |
Note for future self: self-contained script: from pathlib import Path
import shutil
from sphinx.cmd.make_mode import run_make_mode
Path("conf.py").write_text('''\
extensions = ["sphinx.ext.ifconfig"]
def setup(app):
app.add_config_value("config_bool", False, "env")
''', encoding="utf-8")
Path("index.rst").write_text('''\
.. ifconfig:: config_bool
`GitHub Repository <https://github.com/ssec/polar2grid>`__
.. ifconfig:: config_bool
`GitHub Repository <https://github.com/ssec/polar2grid>`__
''', encoding="utf-8")
shutil.rmtree("_build", ignore_errors=True)
run_make_mode(["html", ".", "_build"]) runs as A |
The problem is in Lines 54 to 69 in 873d9f6
specifically when the condition is false. Normally mutating a Docutils node tree whilst iterating ( A |
Fixed by #10502. |
Describe the bug
My project's CI just switched to sphinx 5.0.0 and I'm unable to generate my documentation that depends heavily on
ifconfig
. In this particular case there seems to be an issue with doing an.. include::
of a file that usesifconfig
.How to Reproduce
Expected behavior
No error.
Your project
https://github.com/ssec/polar2grid/
Screenshots
No response
OS
Ubuntu
Python version
3.10
Sphinx version
5.0.0
Sphinx extensions
No response
Extra tools
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: