Skip to content

Commit a9189b3

Browse files
committed
Fix confval role problem
1 parent 39f4f30 commit a9189b3

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/sage_docbuild/ext/sage_autodoc.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
for those who like elaborate docstrings.
1313
1414
This module is currently based on :mod:`sphinx.ext.autodoc` from Sphinx version
15-
7.2.6. Compare against the upstream original source file
15+
7.2.6. Compare (do diff) with the upstream source file
1616
`sphinx/ext/autodoc/__init__.py
1717
<https://github.com/sphinx-doc/sphinx/blob/v7.2.6/sphinx/ext/autodoc/__init__.py>`_.
1818
@@ -223,8 +223,21 @@ def cut_lines(pre: int, post: int = 0, what: str | None = None) -> Callable:
223223
from sphinx.ext.autodoc import cut_lines
224224
app.connect('autodoc-process-docstring', cut_lines(4, what=['module']))
225225
226-
This can (and should) be used in place of :confval:`automodule_skip_lines`.
226+
This can (and should) be used in place of ``automodule_skip_lines``.
227227
"""
228+
# -------------------------------------------------------------------------
229+
# Sphinx in Sage does not use 'sphinx_toolbox.confval' extension, and hence
230+
# does not know the role ":confval:". Use of the role in this module
231+
# results in failure of building the reference manual.
232+
#
233+
# In the above docstring,
234+
#
235+
# ... in place of :confval:`automodule_skip_lines`.
236+
#
237+
# was changed to
238+
#
239+
# ... in place of ``automodule_skip_lines``.
240+
# -------------------------------------------------------------------------
228241
def process(app: Sphinx, what_: str, name: str, obj: Any, options: Any, lines: list[str],
229242
) -> None:
230243
if what and what_ not in what:

0 commit comments

Comments
 (0)