diff --git a/crates/mdman/src/hbs.rs b/crates/mdman/src/hbs.rs index 09726b83ce7..ca739900cf0 100644 --- a/crates/mdman/src/hbs.rs +++ b/crates/mdman/src/hbs.rs @@ -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() diff --git a/crates/mdman/tests/compare/expected/options.1 b/crates/mdman/tests/compare/expected/options.1 index d362421e9f0..02ba1eb66bc 100644 --- a/crates/mdman/tests/compare/expected/options.1 +++ b/crates/mdman/tests/compare/expected/options.1 @@ -69,6 +69,11 @@ Flag with optional value. .RS 4 Alternate syntax for optional value (with required = for disambiguation). .RE +.sp +\fB\-\-split\-block\fR +.RS 4 +An option where the description has a \fBblock statement that is split across multiple lines\fR +.RE .SH "EXAMPLES" .sp .RS 4 diff --git a/crates/mdman/tests/compare/expected/options.md b/crates/mdman/tests/compare/expected/options.md index 19b0b443b64..0178cac2d7c 100644 --- a/crates/mdman/tests/compare/expected/options.md +++ b/crates/mdman/tests/compare/expected/options.md @@ -58,6 +58,10 @@ A description of the command.
--split-block
block statement that is split across multiple lines