sphinx-doc / sphinx

The Sphinx documentation generator
https://www.sphinx-doc.org/
Other
6.59k stars 2.12k forks source link

Gettext builder not extracting content of doctest blocks #12871

Open m-aciek opened 2 months ago

m-aciek commented 2 months ago

Describe the bug

Hi, running a gettext builder on a documents with doctest-block in gettext_additional_targets doesn't add the content of doctest blocks in generated POTs.

How to Reproduce

  1. Add doctest-block to gettext_additional_targets in conf.py (https://github.com/python/cpython/pull/123852).

  2. Run % make gettext.

  3. -> lack of expected doctest blocks in POTs

Environment Information

Sphinx version: v7.3.7

Additional context

From a quick look I'm not able to figure out the cause in the Sphinx codebase.