From be0b77e7a73dded31deb35f48a8027285ec77cba Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 19 Feb 2022 12:47:29 +0100 Subject: [PATCH] when help item has an \n, translate it to a
example: https://uutils.github.io/coreutils-docs/user/utils/ls.html / classify --- src/bin/uudoc.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bin/uudoc.rs b/src/bin/uudoc.rs index 4020b2787..33e5bf607 100644 --- a/src/bin/uudoc.rs +++ b/src/bin/uudoc.rs @@ -201,7 +201,11 @@ fn write_options(w: &mut impl Write, app: &App) -> io::Result<()> { write!(w, "")?; } writeln!(w, "")?; - writeln!(w, "
\n\n{}\n\n
", arg.get_help().unwrap_or_default())?; + writeln!( + w, + "
\n\n{}\n\n
", + arg.get_help().unwrap_or_default().replace("\n", "
") + )?; } writeln!(w, "\n") }