gen: do italics/bold for a range of letters, not just single word

Previously it would match only on a sequence of non-space, which made it
miss to highlight for example "public suffix list".

Updated the recent cookie.d edit from 5da57193b7 to use bold instead
of italics.

Closes #12689
This commit is contained in:
Daniel Stenberg 2024-01-13 10:49:20 +01:00
parent 5da57193b7
commit 9729560a6f
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@ Users often want to both read cookies from a file and write updated cookies
back to a file, so using both --cookie and --cookie-jar in the same command
line is common.
If curl is built with PSL (*Public Suffix List*) support, it detects and
If curl is built with PSL (**Public Suffix List**) support, it detects and
discards cookies that are specified for such suffix domains that should not be
allowed to have cookies. If curl is *not* built with PSL support, it has no
ability to stop super cookies.

View File

@ -98,9 +98,9 @@ sub printdesc {
}
if($d !~ /^.\\"/) {
# **bold**
$d =~ s/\*\*([^ ]*)\*\*/\\fB$1\\fP/g;
$d =~ s/\*\*(.*?)\*\*/\\fB$1\\fP/g;
# *italics*
$d =~ s/\*([^ ]*)\*/\\fI$1\\fP/g;
$d =~ s/\*(.*?)\*/\\fI$1\\fP/g;
}
if(!$exam && ($d =~ /^ /)) {
# start of example