"Unknown section" error because of something in a Literal block
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- documentation
Research direction
Start by reproducing the supplied docstring with Sphinx 5.0.2 and numpydoc 1.4.0, comparing the warning and HTML output with the two documented workarounds. Done means the literal block no longer produces an “Unknown section” warning and renders correctly without requiring either workaround.
Written by the indexing model from the issue text.
Description
I have the following docstring:
Returns the quadric with matrix ::
I |
---+-----
| 0 1
| 1 0
Returns
-------
Quadric
Building this, I get the warning Unknown section I | in the docstring of.... The html looks like this:
So clearly something is wrong there too.
I've found two workarounds: Either add a character to the end of the first line of the block, as in
I |.
---+-----
| 0 1
| 1 0
or remove the leading space from the first line, as in
I |
---+-----
| 0 1
| 1 0
Tested with sphinx 5.0.2, numpydoc 1.4.0.
- Dominant language
- Python
- Stars
- 355
- Forks
- 181
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from numpy/numpydoc
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
numpydoc Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
-
needs-decision
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 63/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
Similar issues
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100