-
-
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
source-read for included files is called with a file path, not a docname #11643
Comments
This is a short-term solution for longturn#2023. In the long run, upstream issues should be fixed: * sphinx-doc/sphinx#11643 * mgeier/sphinx-last-updated-by-git#57 Closes longturn#2023.
This is a short-term solution for #2023. In the long run, upstream issues should be fixed: * sphinx-doc/sphinx#11643 * mgeier/sphinx-last-updated-by-git#57 Closes #2023.
I think this has been fixed by #11650 (the example in the body of the issue no longer fails) A |
Confirmed fixed, thanks! |
This is still a bit fishy. If you use a path outside the source directory, e.g. .. include:: ../../some/path/included-file.rst ... AND if the first element of source_suffix = ['.nonsense', '.rst'] ... then it breaks, because the first |
Now resolved by #11657 as we no longer try and convert the path to a docname. |
Describe the bug
Since #10678, the
source-read
event is emitted for included files. The first argument passed to the function in this case is a file path, not a docname. This breaks hooks trying to access the document, except when building from the source folder. Extensions such assphinx-last-updated-by-git
(also currently broken for a different reason) would need to work around the present behavior.How to Reproduce
Put the following in a folder called
docs
:docs/conf.py:
docs/index.rst:
docs/something-to-include.rst:
Testing =======
docs/my-extension.py:
Then execute:
Environment Information
Sphinx extensions
Additional context
Debugging longturn/freeciv21#2023
The text was updated successfully, but these errors were encountered: