mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
[mdman] Normalize newlines when rendering options
This commit is contained in:
parent
a250d275ef
commit
8e2a37cc17
@ -139,6 +139,9 @@ impl HelperDef for OptionHelper<'_> {
|
||||
// Render the block.
|
||||
let block = t.renders(r, gctx, rc)?;
|
||||
|
||||
// Windows newlines can break some rendering, so normalize.
|
||||
let block = block.replace("\r\n", "\n");
|
||||
|
||||
// Get the name of this page.
|
||||
let man_name = gctx
|
||||
.data()
|
||||
|
@ -72,7 +72,7 @@ Alternate syntax for optional value (with required = for disambiguation).
|
||||
.sp
|
||||
\fB\-\-split\-block\fR
|
||||
.RS 4
|
||||
An option where the description has a \fBblock statement that is split across multiple lines\fR
|
||||
An option where the description has a \fBblock statement that is split across multiple lines\fR
|
||||
.RE
|
||||
.SH "EXAMPLES"
|
||||
.sp
|
||||
|
@ -59,7 +59,7 @@ A description of the command.
|
||||
|
||||
|
||||
<dt class="option-term" id="option-options---split-block"><a class="option-anchor" href="#option-options---split-block"></a><code>--split-block</code></dt>
|
||||
<dd class="option-desc">An option where the description has a <code>block statement that is split across multiple lines</code></dd>
|
||||
<dd class="option-desc">An option where the description has a <code>block statement that is split across multiple lines</code></dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
Loading…
x
Reference in New Issue
Block a user