sphinx-doc / sphinx-doc/sphinx

manpages builder uses bold for entire options

Open
#10,259 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

builder:manpage type:bug
Dominant language
Python
Stars
8k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

Unfortunately the manpages writer doesn't follow the conventions of man pages when it generates the output for .. option:: directives. It makes the entire line bold, not just the literal parts.

How to Reproduce

Run this through the manpages builder:

.. option:: -p PROJECT, --project=PROJECT
   Project name will be set.

You'll get:

.B \-p PROJECT, \-\-project=PROJECT
Project name will be set.
Expected behavior
\fB\-p\fR \fIPROJECT\fR, \fB\-\-project\fR=\fIPROJECT\fR
Project name will be set.
Your project

N/A

Screenshots

No response

OS

Linux

Python version

3.6.12

Sphinx version

4.2.0

Sphinx extensions

No response

Extra tools

No response

Additional context

No response

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 manpages builder and reproduce the issue using the provided reStructuredText option directive. Compare the generated troff with the expected output, and consider the work complete when option names are bold, argument placeholders are italic, and separators retain normal formatting.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.