numpy / numpy/numpydoc

References before the first section of a file are mangled

Open
#301 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hello,
I found a similar issue to #214 which has already been fixed. I believe the trigger is when the reference appears before the first section of the document. The following image illustrates the problem, and I have modified the standalone example in #214 to show the new issue.

image

The test case is attached as: numpydoctest.zip
The command given to reproduce the error is
sphinx-build -b singlehtml -d _build/doctrees . _build/singlehtml

I checked out 0.9.2 and 0.8.0 as well, both have the still have the issue so I don't think this is a regression. I also checked the issue is reproducible on the latest master commit.

Sincerely,
Caleb

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.

Research direction

Start with the attached numpydoctest.zip and reproduce the issue using sphinx-build -b singlehtml -d _build/doctrees . _build/singlehtml. Compare the behavior with issue #214 and trace how references before the first section are handled. Done means those references render correctly in the generated single-page HTML.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.