1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 12:07:46 +00:00

when help item has an \n, translate it to a <br />

example:
https://uutils.github.io/coreutils-docs/user/utils/ls.html / classify
This commit is contained in:
Sylvestre Ledru 2022-02-19 12:47:29 +01:00
parent 716444c7b1
commit be0b77e7a7

View file

@ -201,7 +201,11 @@ fn write_options(w: &mut impl Write, app: &App) -> io::Result<()> {
write!(w, "</code>")?;
}
writeln!(w, "</dt>")?;
writeln!(w, "<dd>\n\n{}\n\n</dd>", arg.get_help().unwrap_or_default())?;
writeln!(
w,
"<dd>\n\n{}\n\n</dd>",
arg.get_help().unwrap_or_default().replace("\n", "<br />")
)?;
}
writeln!(w, "</dl>\n")
}