Skip to content

Fix todo parsing of repeated punctuation#14460

Open
cyphercodes wants to merge 1 commit into
sphinx-doc:masterfrom
cyphercodes:fix-todo-repeated-punctuation-12346
Open

Fix todo parsing of repeated punctuation#14460
cyphercodes wants to merge 1 commit into
sphinx-doc:masterfrom
cyphercodes:fix-todo-repeated-punctuation-12346

Conversation

@cyphercodes
Copy link
Copy Markdown

Purpose

Fix sphinx.ext.todo so text supplied on the directive line is parsed as inline content before parsing the indented body. This prevents repeated punctuation such as ???? from being interpreted by Docutils as structural markup and keeps it rendered as todo text.

Added a focused regression test and a CHANGES.rst entry.

Tests:

  • python -m pytest tests/test_extensions/test_ext_todo.py -q
  • ruff check sphinx/ext/todo.py tests/test_extensions/test_ext_todo.py

References

@cyphercodes cyphercodes force-pushed the fix-todo-repeated-punctuation-12346 branch from 4aa35dc to 3d6c86f Compare May 31, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

todo directive treat repeated special characters as headers

2 participants