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

todo directive treat repeated special characters as headers #12346

Open
picnixz opened this issue May 4, 2024 · 0 comments
Open

todo directive treat repeated special characters as headers #12346

picnixz opened this issue May 4, 2024 · 0 comments
Labels

Comments

@picnixz
Copy link
Member

picnixz commented May 4, 2024

Describe the bug

The todo does not like:

def f():
    """
    .. todo:: ????
    """

but it is fine with

def f():
    """
    .. todo:: ???
    """

I haven't looked at the code yet but I suspect it's because we are parsing the body differently using a nested_parse but I'm not sure whether I should consider it a bug or not. I do like having ???? when I debug because I don't understand what happens but it might be something we shouldn't care about?

@chrisjsewell you worked a lot with the docutils' parser so what are your thoughts for that directive? should we actually parse it the same way we do for .. rubric ? because the latter works in those cases:

.. rubric:: ????

and

.. rubric:: pouet

   ????

How to Reproduce

def f():
    """
    .. todo:: ????
    """

Environment Information

Platform:              linux; (Linux-5.14.21-150500.55.52-default-x86_64-with-glibc2.31)
Python version:        3.10.14 (main, Mar 24 2024, 08:01:04) [GCC])
Python implementation: CPython
Sphinx version:        7.4.0+/b8545e91c
Docutils version:      0.20.1
Jinja2 version:        3.1.3
Pygments version:      2.17.2

Sphinx extensions

['sphinx.ext.todo']

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant