see also section crashes on :doc:`...`

Open
#232 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
documentation

Research direction

Reproduce the crash using the foobar.py docstring and index.rst example with Sphinx 2.2.0 and numpydoc 0.9.1. Start by tracing how the See Also section parses :doc: and :ref: roles; done means the example builds without ParseError while preserving both references in the main text and See Also section.

Written by the indexing model from the issue text.

Description

foobar.py:

def main():
    """
    Some fooings, refer to :ref:`the-title` and :doc:`/index`.

    See Also
    --------
    :ref:`the-title`
    :doc:`/index`
    """

index.rst

.. _the-title:

Welcome to foo's documentation!
===============================

.. toctree::
   :maxdepth: 2
   :caption: Contents:

.. automodule:: foobar
   :members:

Building with sphinx 2.2.0, numpydoc 0.9.1 crashes on the :doc: entry in the see also section with

"numpydoc.docscrape.ParseError: :doc:`/index` is not a item name in 'Some fooings, refer to :ref:`the-title` and :doc:`/index`.\n\nSee Also\n--------\n:ref:`the-title`\n:doc:`/index`'"

even though in the main text both the :ref: and the :doc: work fine and the :ref: works fine in the See Also section as well.

Dominant language
Python
Stars
355
Forks
181
Avg merge
1d 9h
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from numpy/numpydoc

All issues in numpy/numpydoc

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.