[mdman] Normalize newlines when rendering options

This commit is contained in:
Daniel Paoliello 2024-08-19 15:02:04 -07:00
parent a250d275ef
commit 8e2a37cc17
3 changed files with 5 additions and 2 deletions

View File

@ -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()

View File

@ -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

View File

@ -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>