managen: accept more markdown-quote-markers

Lines starting with ``` or ~~~ indicate start and end of a quoted
section.

Closes #16685
This commit is contained in:
Daniel Stenberg 2025-03-12 13:09:30 +01:00
parent 3c9a1d3fcf
commit 67a1cfa5ef
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -320,7 +320,23 @@ sub render {
$quote = 1;
$d = "$word\n";
}
elsif($quote) {
elsif($d =~ /^(```|~~~)/) {
if(!$quote) {
if($manpage) {
push @desc, "\n" if($blankline);
push @desc, ".nf\n";
$blankline = 0;
}
$quote = 2;
}
else {
# end of quote
push @desc, ".fi\n" if($manpage);
$quote = 0;
}
next;
}
elsif($quote == 1) {
# end of quote
push @desc, ".fi\n" if($manpage);
$quote = 0;