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

Todos in list of todos may contain wrong links to documents #8782

Closed
dbitouze opened this issue Jan 29, 2021 · 0 comments
Closed

Todos in list of todos may contain wrong links to documents #8782

dbitouze opened this issue Jan 29, 2021 · 0 comments

Comments

@dbitouze
Copy link

Describe the bug
Suppose the following minimal structure:

source
├── conf.py
├── folder1
│   └── file1.rst
├── folder2
│   └── file2.rst
├── index.rst
├── _static
└── _templates

where:

  • source/conf.py contains:
extensions = [
    'sphinx.ext.todo',
]
todo_include_todos = True
todo_link_only = True
  • source/index.rst contains:
.. Test documentation master file, created by
   sphinx-quickstart on Fri Jan 29 15:53:41 2021.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

Welcome to Test's documentation!
================================

.. toctree::
   :maxdepth: 2
   :caption: Contents:
   :glob:
   :hidden:

   */*

Todos
=====
.. todolist::

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
  • source/folder1/file1.rst contains:
Title 1
=======

.. todo:: See :doc:`Title 2 </folder2/file2>`
  • source/folder2/file2.rst contains:
Title 2
=======

After a make html:

  • the todo in build/html/folder1/file1.html contains the (right) link .../build/html/folder2/file2.html,
  • the todo in build/html/index.html contains the (wrong) link ..../build/folder2/file2.html.

To Reproduce
See the joined minimal project.

Expected behavior
Todos in list of todos should contain right links to documents.

Your project
test-3.4.3.tar.gz

Environment info

  • OS: Linux Mageia 7
  • Python version: 3.7.9
  • Sphinx version: 3.4.3
  • Sphinx extensions: sphinx.ext.todo
@tk0miya tk0miya added this to the 3.5.0 milestone Feb 1, 2021
@tk0miya tk0miya closed this as completed in a65b333 Feb 2, 2021
tk0miya added a commit that referenced this issue Feb 2, 2021
Fix #8782: todo: Cross references in todolist get broken
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants