Skip to content

fix: align first line of unordered list with following #15161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions crates/mdman/doc/out/mdman.1
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ The handlebars template has several special tags to assist with generating the
man page:
.sp
.RS 4
\h'-04'\(bu\h'+02'Every block of command\-line options must be wrapped between \fB{{#options}}\fR
\h'-04'\(bu\h'+03'Every block of command\-line options must be wrapped between \fB{{#options}}\fR
and \fB{{/options}}\fR tags. This tells the processor where the options start
and end.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'Each option must be expressed with a \fB{{#option}}\fR block. The parameters to
\h'-04'\(bu\h'+03'Each option must be expressed with a \fB{{#option}}\fR block. The parameters to
the block are a sequence of strings indicating the option. For example,
\fB{{#option "`\-p` _spec_..." "`\-\-package` _spec_..."}}\fR is an option that
has two different forms. The text within the string is processed as markdown.
Expand All @@ -41,29 +41,29 @@ Use the \fB{{/option}}\fR tag to end the option block.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'References to other man pages should use the \fB{{man name section}}\fR
\h'-04'\(bu\h'+03'References to other man pages should use the \fB{{man name section}}\fR
expression. For example, \fB{{man "mdman" 1}}\fR will generate a reference to
the \fBmdman(1)\fR man page. For non\-troff output, the \fB\-\-man\fR option will tell
\fBmdman\fR how to create links to the man page. If there is no matching \fB\-\-man\fR
option, then it links to a file named \fIname\fR\fB\&.md\fR in the same directory.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'Variables can be set with \fB{{*set name="value"}}\fR\&. These variables can
\h'-04'\(bu\h'+03'Variables can be set with \fB{{*set name="value"}}\fR\&. These variables can
then be referenced with \fB{{name}}\fR expressions.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'Partial templates should be placed in a directory named \fBincludes\fR
\h'-04'\(bu\h'+03'Partial templates should be placed in a directory named \fBincludes\fR
next to the source file. Templates can be included with an expression like
\fB{{> template\-name}}\fR\&.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'Other helpers include:
\h'-04'\(bu\h'+03'Other helpers include:
.sp
.RS 4
\h'-04'\(bu\h'+02'\fB{{lower value}}\fR Converts the given value to lowercase.
\h'-04'\(bu\h'+03'\fB{{lower value}}\fR Converts the given value to lowercase.
.RE
.RE
.SH "OPTIONS"
Expand All @@ -73,17 +73,17 @@ next to the source file. Templates can be included with an expression like
Specifies the output type. The following output types are supported:
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBman\fR \[em] A troff\-style man page. Outputs with a numbered extension (like
\h'-04'\(bu\h'+03'\fBman\fR \[em] A troff\-style man page. Outputs with a numbered extension (like
\fB\&.1\fR) matching the man page section.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBmd\fR \[em] A markdown file, after all handlebars processing has been finished.
\h'-04'\(bu\h'+03'\fBmd\fR \[em] A markdown file, after all handlebars processing has been finished.
Outputs with the \fB\&.md\fR extension.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBtxt\fR \[em] A text file, rendered for situations where a man page viewer isn\[cq]t
\h'-04'\(bu\h'+03'\fBtxt\fR \[em] A text file, rendered for situations where a man page viewer isn\[cq]t
available. Outputs with the \fB\&.txt\fR extension.
.RE
.RE
Expand Down
2 changes: 1 addition & 1 deletion crates/mdman/src/format/man.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ impl<'e> ManRenderer<'e> {
*n += 1;
}
// Unordered list.
None => self.output.push_str("\\h'-04'\\(bu\\h'+02'"),
None => self.output.push_str("\\h'-04'\\(bu\\h'+03'"),
}
suppress_paragraph = true;
}
Expand Down
6 changes: 3 additions & 3 deletions crates/mdman/tests/compare/expected/formatting.1
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ goodness regarding reindeer so astride before.
\h'-04' 1.\h'+01'Ordered list
.sp
.RS 4
\h'-04'\(bu\h'+02'Unordered list
\h'-04'\(bu\h'+03'Unordered list
.sp
With a second paragraph inside it
.sp
Expand All @@ -61,11 +61,11 @@ With a second paragraph inside it
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'Eggs
\h'-04'\(bu\h'+03'Eggs
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'Milk
\h'-04'\(bu\h'+03'Milk
.sp
.RS 4
\h'-04' 5.\h'+01'Don\[cq]t start at one.
Expand Down
10 changes: 5 additions & 5 deletions crates/mdman/tests/compare/expected/options.1
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ my\-command \- A brief description
A description of the command.
.sp
.RS 4
\h'-04'\(bu\h'+02'One
\h'-04'\(bu\h'+03'One
.sp
.RS 4
\h'-04'\(bu\h'+02'Sub one
\h'-04'\(bu\h'+03'Sub one
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'Sub two
\h'-04'\(bu\h'+03'Sub two
.RE
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'Two
\h'-04'\(bu\h'+03'Two
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'Three
\h'-04'\(bu\h'+03'Three
.RE
.SH "OPTIONS"
.SS "Command options"
Expand Down
26 changes: 13 additions & 13 deletions src/etc/man/cargo-add.1
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,29 @@ This command can add or modify dependencies.
The source for the dependency can be specified with:
.sp
.RS 4
\h'-04'\(bu\h'+02'\fIcrate\fR\fB@\fR\fIversion\fR: Fetch from a registry with a version constraint of \[lq]\fIversion\fR\[rq]
\h'-04'\(bu\h'+03'\fIcrate\fR\fB@\fR\fIversion\fR: Fetch from a registry with a version constraint of \[lq]\fIversion\fR\[rq]
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fB\-\-path\fR \fIpath\fR: Fetch from the specified \fIpath\fR
\h'-04'\(bu\h'+03'\fB\-\-path\fR \fIpath\fR: Fetch from the specified \fIpath\fR
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fB\-\-git\fR \fIurl\fR: Pull from a git repo at \fIurl\fR
\h'-04'\(bu\h'+03'\fB\-\-git\fR \fIurl\fR: Pull from a git repo at \fIurl\fR
.RE
.sp
If no source is specified, then a best effort will be made to select one, including:
.sp
.RS 4
\h'-04'\(bu\h'+02'Existing dependencies in other tables (like \fBdev\-dependencies\fR)
\h'-04'\(bu\h'+03'Existing dependencies in other tables (like \fBdev\-dependencies\fR)
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'Workspace members
\h'-04'\(bu\h'+03'Workspace members
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'Latest release in the registry
\h'-04'\(bu\h'+03'Latest release in the registry
.RE
.sp
When you add a package that is already present, the existing entry will be updated with the flags specified.
Expand Down Expand Up @@ -189,16 +189,16 @@ May also be specified with the \fBterm.quiet\fR
Control when colored output is used. Valid values:
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBauto\fR (default): Automatically detect if color support is available on the
\h'-04'\(bu\h'+03'\fBauto\fR (default): Automatically detect if color support is available on the
terminal.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBalways\fR: Always display colors.
\h'-04'\(bu\h'+03'\fBalways\fR: Always display colors.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBnever\fR: Never display colors.
\h'-04'\(bu\h'+03'\fBnever\fR: Never display colors.
.RE
.sp
May also be specified with the \fBterm.color\fR
Expand Down Expand Up @@ -230,11 +230,11 @@ existing \fBCargo.lock\fR file was originally generated. Cargo will exit with an
error when either of the following scenarios arises:
.sp
.RS 4
\h'-04'\(bu\h'+02'The lock file is missing.
\h'-04'\(bu\h'+03'The lock file is missing.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'Cargo attempted to change the lock file due to a different dependency resolution.
\h'-04'\(bu\h'+03'Cargo attempted to change the lock file due to a different dependency resolution.
.RE
.sp
It may be used in environments where deterministic builds are desired,
Expand Down Expand Up @@ -322,11 +322,11 @@ details on environment variables that Cargo reads.
.SH "EXIT STATUS"
.sp
.RS 4
\h'-04'\(bu\h'+02'\fB0\fR: Cargo succeeded.
\h'-04'\(bu\h'+03'\fB0\fR: Cargo succeeded.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fB101\fR: Cargo failed to complete.
\h'-04'\(bu\h'+03'\fB101\fR: Cargo failed to complete.
.RE
.SH "EXAMPLES"
.sp
Expand Down
40 changes: 20 additions & 20 deletions src/etc/man/cargo-bench.1
Original file line number Diff line number Diff line change
Expand Up @@ -123,24 +123,24 @@ When no target selection options are given, \fBcargo bench\fR will build the
following targets of the selected packages:
.sp
.RS 4
\h'-04'\(bu\h'+02'lib \[em] used to link with binaries and benchmarks
\h'-04'\(bu\h'+03'lib \[em] used to link with binaries and benchmarks
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'bins (only if benchmark targets are built and required features are
\h'-04'\(bu\h'+03'bins (only if benchmark targets are built and required features are
available)
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'lib as a benchmark
\h'-04'\(bu\h'+03'lib as a benchmark
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'bins as benchmarks
\h'-04'\(bu\h'+03'bins as benchmarks
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'benchmark targets
\h'-04'\(bu\h'+03'benchmark targets
.RE
.sp
The default behavior can be changed by setting the \fBbench\fR flag for the target
Expand Down Expand Up @@ -294,15 +294,15 @@ Specifying an output format (rather than the default) is unstable and requires
\fB\-Zunstable\-options\fR\&. Valid output formats:
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBhtml\fR (unstable, requires \fB\-Zunstable\-options\fR): Write a human\-readable file \fBcargo\-timing.html\fR to the
\h'-04'\(bu\h'+03'\fBhtml\fR (unstable, requires \fB\-Zunstable\-options\fR): Write a human\-readable file \fBcargo\-timing.html\fR to the
\fBtarget/cargo\-timings\fR directory with a report of the compilation. Also write
a report to the same directory with a timestamp in the filename if you want
to look at older runs. HTML output is suitable for human consumption only,
and does not provide machine\-readable timing data.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBjson\fR (unstable, requires \fB\-Zunstable\-options\fR): Emit machine\-readable JSON
\h'-04'\(bu\h'+03'\fBjson\fR (unstable, requires \fB\-Zunstable\-options\fR): Emit machine\-readable JSON
information about timing information.
.RE
.RE
Expand Down Expand Up @@ -348,16 +348,16 @@ May also be specified with the \fBterm.quiet\fR
Control when colored output is used. Valid values:
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBauto\fR (default): Automatically detect if color support is available on the
\h'-04'\(bu\h'+03'\fBauto\fR (default): Automatically detect if color support is available on the
terminal.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBalways\fR: Always display colors.
\h'-04'\(bu\h'+03'\fBalways\fR: Always display colors.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBnever\fR: Never display colors.
\h'-04'\(bu\h'+03'\fBnever\fR: Never display colors.
.RE
.sp
May also be specified with the \fBterm.color\fR
Expand All @@ -370,34 +370,34 @@ The output format for diagnostic messages. Can be specified multiple times
and consists of comma\-separated values. Valid values:
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBhuman\fR (default): Display in a human\-readable text format. Conflicts with
\h'-04'\(bu\h'+03'\fBhuman\fR (default): Display in a human\-readable text format. Conflicts with
\fBshort\fR and \fBjson\fR\&.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBshort\fR: Emit shorter, human\-readable text messages. Conflicts with \fBhuman\fR
\h'-04'\(bu\h'+03'\fBshort\fR: Emit shorter, human\-readable text messages. Conflicts with \fBhuman\fR
and \fBjson\fR\&.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBjson\fR: Emit JSON messages to stdout. See
\h'-04'\(bu\h'+03'\fBjson\fR: Emit JSON messages to stdout. See
\fIthe reference\fR <https://doc.rust\-lang.org/cargo/reference/external\-tools.html#json\-messages>
for more details. Conflicts with \fBhuman\fR and \fBshort\fR\&.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBjson\-diagnostic\-short\fR: Ensure the \fBrendered\fR field of JSON messages contains
\h'-04'\(bu\h'+03'\fBjson\-diagnostic\-short\fR: Ensure the \fBrendered\fR field of JSON messages contains
the \[lq]short\[rq] rendering from rustc. Cannot be used with \fBhuman\fR or \fBshort\fR\&.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBjson\-diagnostic\-rendered\-ansi\fR: Ensure the \fBrendered\fR field of JSON messages
\h'-04'\(bu\h'+03'\fBjson\-diagnostic\-rendered\-ansi\fR: Ensure the \fBrendered\fR field of JSON messages
contains embedded ANSI color codes for respecting rustc\[cq]s default color
scheme. Cannot be used with \fBhuman\fR or \fBshort\fR\&.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBjson\-render\-diagnostics\fR: Instruct Cargo to not include rustc diagnostics
\h'-04'\(bu\h'+03'\fBjson\-render\-diagnostics\fR: Instruct Cargo to not include rustc diagnostics
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo\[cq]s own JSON diagnostics and others
coming from rustc are still emitted. Cannot be used with \fBhuman\fR or \fBshort\fR\&.
Expand All @@ -423,11 +423,11 @@ existing \fBCargo.lock\fR file was originally generated. Cargo will exit with an
error when either of the following scenarios arises:
.sp
.RS 4
\h'-04'\(bu\h'+02'The lock file is missing.
\h'-04'\(bu\h'+03'The lock file is missing.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'Cargo attempted to change the lock file due to a different dependency resolution.
\h'-04'\(bu\h'+03'Cargo attempted to change the lock file due to a different dependency resolution.
.RE
.sp
It may be used in environments where deterministic builds are desired,
Expand Down Expand Up @@ -542,11 +542,11 @@ details on environment variables that Cargo reads.
.SH "EXIT STATUS"
.sp
.RS 4
\h'-04'\(bu\h'+02'\fB0\fR: Cargo succeeded.
\h'-04'\(bu\h'+03'\fB0\fR: Cargo succeeded.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fB101\fR: Cargo failed to complete.
\h'-04'\(bu\h'+03'\fB101\fR: Cargo failed to complete.
.RE
.SH "EXAMPLES"
.sp
Expand Down
Loading